[PATCH] sched: arch preempt notifier mechanism

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e107be36efb2a233833e8c9899039a370e4b2318
Commit: e107be36efb2a233833e8c9899039a370e4b2318
Parent: b47e8608a08766ef8121cd747d3aaf6c3dc22649
Author: Avi Kivity [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: arch preempt notifier mechanism

This adds a general mechanism whereby a task can request the scheduler to
notify it whenever it is preempted or scheduled back in.  This allows the
task to swap any special-purpose registers like the fpu or Intel's VT
registers.

Signed-off-by: Avi Kivity [EMAIL PROTECTED]
[ [EMAIL PROTECTED]: fixes, cleanups ]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 include/linux/preempt.h |   44 
 include/linux/sched.h   |5 +++
 kernel/Kconfig.preempt  |3 ++
 kernel/sched.c  |   73 +-
 4 files changed, 123 insertions(+), 2 deletions(-)

diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index d0926d6..484988e 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -8,6 +8,7 @@
 
 #include linux/thread_info.h
 #include linux/linkage.h
+#include linux/list.h
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);
@@ -60,4 +61,47 @@ do { \
 
 #endif
 
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+
+struct preempt_notifier;
+
+/**
+ * preempt_ops - notifiers called when a task is preempted and rescheduled
+ * @sched_in: we're about to be rescheduled:
+ *notifier: struct preempt_notifier for the task being scheduled
+ *cpu:  cpu we're scheduled on
+ * @sched_out: we've just been preempted
+ *notifier: struct preempt_notifier for the task being preempted
+ *next: the task that's kicking us out
+ */
+struct preempt_ops {
+   void (*sched_in)(struct preempt_notifier *notifier, int cpu);
+   void (*sched_out)(struct preempt_notifier *notifier,
+ struct task_struct *next);
+};
+
+/**
+ * preempt_notifier - key for installing preemption notifiers
+ * @link: internal use
+ * @ops: defines the notifier functions to be called
+ *
+ * Usually used in conjunction with container_of().
+ */
+struct preempt_notifier {
+   struct hlist_node link;
+   struct preempt_ops *ops;
+};
+
+void preempt_notifier_register(struct preempt_notifier *notifier);
+void preempt_notifier_unregister(struct preempt_notifier *notifier);
+
+static inline void preempt_notifier_init(struct preempt_notifier *notifier,
+struct preempt_ops *ops)
+{
+   INIT_HLIST_NODE(notifier-link);
+   notifier-ops = ops;
+}
+
+#endif
+
 #endif /* __LINUX_PREEMPT_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7c61b50..7a4de87 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -935,6 +935,11 @@ struct task_struct {
struct sched_class *sched_class;
struct sched_entity se;
 
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+   /* list of struct preempt_notifier: */
+   struct hlist_head preempt_notifiers;
+#endif
+
unsigned short ioprio;
 #ifdef CONFIG_BLK_DEV_IO_TRACE
unsigned int btrace_seq;
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index c64ce9c..6b06663 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -63,3 +63,6 @@ config PREEMPT_BKL
  Say Y here if you are building a kernel for a desktop system.
  Say N if you are unsure.
 
+config PREEMPT_NOTIFIERS
+   bool
+
diff --git a/kernel/sched.c b/kernel/sched.c
index 93cf241..e901aa5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1592,6 +1592,10 @@ static void __sched_fork(struct task_struct *p)
INIT_LIST_HEAD(p-run_list);
p-se.on_rq = 0;
 
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+   INIT_HLIST_HEAD(p-preempt_notifiers);
+#endif
+
/*
 * We mark the process as running here, but have not actually
 * inserted it onto the runqueue yet. This guarantees that
@@ -1673,6 +1677,63 @@ void fastcall wake_up_new_task(struct task_struct *p, 
unsigned long clone_flags)
task_rq_unlock(rq, flags);
 }
 
+#ifdef CONFIG_PREEMPT_NOTIFIERS
+
+/**
+ * preempt_notifier_register - tell me when current is being being preempted
+ * and rescheduled
+ */
+void preempt_notifier_register(struct preempt_notifier *notifier)
+{
+   hlist_add_head(notifier-link, current-preempt_notifiers);
+}
+EXPORT_SYMBOL_GPL(preempt_notifier_register);
+
+/**
+ * preempt_notifier_unregister - no longer interested in preemption 
notifications
+ *
+ * This is safe to call from within a preemption notifier.
+ */
+void preempt_notifier_unregister(struct preempt_notifier *notifier)
+{
+   hlist_del(notifier-link);
+}
+EXPORT_SYMBOL_GPL(preempt_notifier_unregister);

[PATCH] sched: remove unused rq-load_balance_class

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=018a2212950457b1093e504cd834aa0fe749da6c
Commit: 018a2212950457b1093e504cd834aa0fe749da6c
Parent: e107be36efb2a233833e8c9899039a370e4b2318
Author: Satoru Takeuchi [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: remove unused rq-load_balance_class

Remove unused rq-load_balance_class.

Signed-off-by: Satoru Takeuchi [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 kernel/sched.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e901aa5..cc6c119 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -263,8 +263,6 @@ struct rq {
unsigned int clock_warps, clock_overflows;
unsigned int clock_unstable_events;
 
-   struct sched_class *load_balance_class;
-
atomic_t nr_iowait;
 
 #ifdef CONFIG_SMP
-
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


[PATCH] sched: make cpu_clock() not use the rq clock

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2cd4d0ea19713304963dbb2de5073700bfe253f5
Commit: 2cd4d0ea19713304963dbb2de5073700bfe253f5
Parent: 018a2212950457b1093e504cd834aa0fe749da6c
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: make cpu_clock() not use the rq clock

it is enough to disable interrupts to get the precise rq-clock
of the local CPU.

this also solves an NMI watchdog regression: the NMI watchdog
calls touch_softlockup_watchdog(), which might deadlock on
rq-lock if the NMI hits an rq-locked critical section.

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 kernel/sched.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index cc6c119..3eed860 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -383,13 +383,12 @@ static inline unsigned long long rq_clock(struct rq *rq)
  */
 unsigned long long cpu_clock(int cpu)
 {
-   struct rq *rq = cpu_rq(cpu);
unsigned long long now;
unsigned long flags;
 
-   spin_lock_irqsave(rq-lock, flags);
-   now = rq_clock(rq);
-   spin_unlock_irqrestore(rq-lock, flags);
+   local_irq_save(flags);
+   now = rq_clock(cpu_rq(cpu));
+   local_irq_restore(flags);
 
return now;
 }
-
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


[PATCH] sched: increase SCHED_LOAD_SCALE_FUZZ

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b47e8608a08766ef8121cd747d3aaf6c3dc22649
Commit: b47e8608a08766ef8121cd747d3aaf6c3dc22649
Parent: e4903fb59590f86190280a549420f6cb85bd7f7e
Author: Ingo Molnar [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: increase SCHED_LOAD_SCALE_FUZZ

increase SCHED_LOAD_SCALE_FUZZ that adds a small amount of
over-balancing: to help distribute CPU-bound tasks more fairly on SMP
systems.

the problem of unfair balancing was noticed and reported by Tong N Li.

10 CPU-bound tasks running on 8 CPUs, v2.6.23-rc1:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 2572 mingo 20   0  1576  244  196 R  100  0.0   1:03.61 loop
 2578 mingo 20   0  1576  248  196 R  100  0.0   1:03.59 loop
 2576 mingo 20   0  1576  248  196 R  100  0.0   1:03.52 loop
 2571 mingo 20   0  1576  244  196 R  100  0.0   1:03.46 loop
 2569 mingo 20   0  1576  244  196 R   99  0.0   1:03.36 loop
 2570 mingo 20   0  1576  244  196 R   95  0.0   1:00.55 loop
 2577 mingo 20   0  1576  248  196 R   50  0.0   0:31.88 loop
 2574 mingo 20   0  1576  248  196 R   50  0.0   0:31.87 loop
 2573 mingo 20   0  1576  248  196 R   50  0.0   0:31.86 loop
 2575 mingo 20   0  1576  248  196 R   50  0.0   0:31.86 loop

v2.6.23-rc1 + patch:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 2681 mingo 20   0  1576  244  196 R   85  0.0   3:51.68 loop
 2688 mingo 20   0  1576  244  196 R   81  0.0   3:46.35 loop
 2682 mingo 20   0  1576  244  196 R   80  0.0   3:43.68 loop
 2685 mingo 20   0  1576  248  196 R   80  0.0   3:45.97 loop
 2683 mingo 20   0  1576  248  196 R   80  0.0   3:40.25 loop
 2679 mingo 20   0  1576  244  196 R   80  0.0   3:33.53 loop
 2680 mingo 20   0  1576  244  196 R   79  0.0   3:43.53 loop
 2686 mingo 20   0  1576  244  196 R   79  0.0   3:39.31 loop
 2687 mingo 20   0  1576  244  196 R   78  0.0   3:33.31 loop
 2684 mingo 20   0  1576  244  196 R   77  0.0   3:27.52 loop

so they now nicely converge to the expected 80% long-term CPU usage.

Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 include/linux/sched.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 33b9b48..7c61b50 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -681,7 +681,7 @@ enum cpu_idle_type {
 #define SCHED_LOAD_SHIFT   10
 #define SCHED_LOAD_SCALE   (1L  SCHED_LOAD_SHIFT)
 
-#define SCHED_LOAD_SCALE_FUZZ  (SCHED_LOAD_SCALE  5)
+#define SCHED_LOAD_SCALE_FUZZ  (SCHED_LOAD_SCALE  1)
 
 #ifdef CONFIG_SMP
 #define SD_LOAD_BALANCE1   /* Do load balancing on this 
domain. */
-
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


mmc: remove redundant debug information from sdhci and wbsd

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=462f104ba6a65ea2128462e2ef0c3adb18609954
Commit: 462f104ba6a65ea2128462e2ef0c3adb18609954
Parent: e4d217087458914a6d5d9fd034d7237e6530c619
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Tue Jul 24 21:47:47 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 02:05:39 2007 +0200

mmc: remove redundant debug information from sdhci and wbsd

Remove the extra debugging output that now is properly printed
by the core.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/host/sdhci.c |   13 -
 drivers/mmc/host/wbsd.c  |   13 -
 2 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9fd633a..f2bc87a 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -380,11 +380,6 @@ static void sdhci_prepare_data(struct sdhci_host *host, 
struct mmc_data *data)
if (data == NULL)
return;
 
-   DBG(blksz %04x blks %04x flags %08x\n,
-   data-blksz, data-blocks, data-flags);
-   DBG(tsac %d ms nsac %d clk\n,
-   data-timeout_ns / 100, data-timeout_clks);
-
/* Sanity checks */
BUG_ON(data-blksz * data-blocks  524288);
BUG_ON(data-blksz  host-mmc-max_blk_size);
@@ -495,8 +490,6 @@ static void sdhci_finish_data(struct sdhci_host *host)
data-error = MMC_ERR_FAILED;
}
 
-   DBG(Ending data transfer (%d bytes)\n, data-bytes_xfered);
-
if (data-stop) {
/*
 * The controller needs a reset of internal state machines
@@ -520,8 +513,6 @@ static void sdhci_send_command(struct sdhci_host *host, 
struct mmc_command *cmd)
 
WARN_ON(host-cmd);
 
-   DBG(Sending cmd (%x)\n, cmd-opcode);
-
/* Wait max 10 ms */
timeout = 10;
 
@@ -609,8 +600,6 @@ static void sdhci_finish_command(struct sdhci_host *host)
 
host-cmd-error = MMC_ERR_NONE;
 
-   DBG(Ending cmd (%x)\n, host-cmd-opcode);
-
if (host-cmd-data)
host-data = host-cmd-data;
else
@@ -862,8 +851,6 @@ static void sdhci_tasklet_finish(unsigned long param)
 
mrq = host-mrq;
 
-   DBG(Ending request, cmd (%x)\n, mrq-cmd-opcode);
-
/*
 * The controller needs a reset of internal state machines
 * upon error conditions.
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 1d7ebf3..e0c9808 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -207,8 +207,6 @@ static void wbsd_request_end(struct wbsd_host *host, struct 
mmc_request *mrq)
 {
unsigned long dmaflags;
 
-   DBGF(Ending request, cmd (%x)\n, mrq-cmd-opcode);
-
if (host-dma = 0) {
/*
 * Release ISA DMA controller.
@@ -360,8 +358,6 @@ static void wbsd_send_command(struct wbsd_host *host, 
struct mmc_command *cmd)
int i;
u8 status, isr;
 
-   DBGF(Sending cmd (%x)\n, cmd-opcode);
-
/*
 * Clear accumulated ISR. The interrupt routine
 * will fill this one with events that occur during
@@ -411,8 +407,6 @@ static void wbsd_send_command(struct wbsd_host *host, 
struct mmc_command *cmd)
wbsd_get_short_reply(host, cmd);
}
}
-
-   DBGF(Sent cmd (%x), res %d\n, cmd-opcode, cmd-error);
 }
 
 /*
@@ -550,11 +544,6 @@ static void wbsd_prepare_data(struct wbsd_host *host, 
struct mmc_data *data)
unsigned long dmaflags;
unsigned int size;
 
-   DBGF(blksz %04x blks %04x flags %08x\n,
-   data-blksz, data-blocks, data-flags);
-   DBGF(tsac %d ms nsac %d clk\n,
-   data-timeout_ns / 100, data-timeout_clks);
-
/*
 * Calculate size.
 */
@@ -752,8 +741,6 @@ static void wbsd_finish_data(struct wbsd_host *host, struct 
mmc_data *data)
}
}
 
-   DBGF(Ending data transfer (%d bytes)\n, data-bytes_xfered);
-
wbsd_request_end(host, host-mrq);
 }
 
-
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


mmc: proper debugging output in core

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e4d217087458914a6d5d9fd034d7237e6530c619
Commit: e4d217087458914a6d5d9fd034d7237e6530c619
Parent: 109b5bed18441599b5ab0e1f3623efa5715a4703
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Tue Jul 24 21:46:49 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 02:05:30 2007 +0200

mmc: proper debugging output in core

Make sure that the debugging output in the core is complete.
This should allow us to clean up all the extra debug output
that each and every other host driver seems to contain.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/core/core.c |   48 +++---
 1 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 3208890..d089684 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -68,18 +68,35 @@ void mmc_request_done(struct mmc_host *host, struct 
mmc_request *mrq)
struct mmc_command *cmd = mrq-cmd;
int err = cmd-error;
 
-   pr_debug(%s: req done (CMD%u): %d/%d/%d: %08x %08x %08x %08x\n,
-mmc_hostname(host), cmd-opcode, err,
-mrq-data ? mrq-data-error : 0,
-mrq-stop ? mrq-stop-error : 0,
-cmd-resp[0], cmd-resp[1], cmd-resp[2], cmd-resp[3]);
-
if (err  cmd-retries) {
+   pr_debug(%s: req failed (CMD%u): %d, retrying...\n,
+   mmc_hostname(host), cmd-opcode, err);
+
cmd-retries--;
cmd-error = 0;
host-ops-request(host, mrq);
-   } else if (mrq-done) {
-   mrq-done(mrq);
+   } else {
+   pr_debug(%s: req done (CMD%u): %d: %08x %08x %08x %08x\n,
+   mmc_hostname(host), cmd-opcode, err,
+   cmd-resp[0], cmd-resp[1],
+   cmd-resp[2], cmd-resp[3]);
+
+   if (mrq-data) {
+   pr_debug(%s: %d bytes transferred: %d\n,
+   mmc_hostname(host),
+   mrq-data-bytes_xfered, mrq-data-error);
+   }
+
+   if (mrq-stop) {
+   pr_debug(%s: (CMD%u): %d: %08x %08x %08x %08x\n,
+   mmc_hostname(host), mrq-stop-opcode,
+   mrq-stop-error,
+   mrq-stop-resp[0], mrq-stop-resp[1],
+   mrq-stop-resp[2], mrq-stop-resp[3]);
+   }
+
+   if (mrq-done)
+   mrq-done(mrq);
}
 }
 
@@ -104,6 +121,21 @@ mmc_start_request(struct mmc_host *host, struct 
mmc_request *mrq)
 mmc_hostname(host), mrq-cmd-opcode,
 mrq-cmd-arg, mrq-cmd-flags);
 
+   if (mrq-data) {
+   pr_debug(%s: blksz %d blocks %d flags %08x 
+   tsac %d ms nsac %d\n,
+   mmc_hostname(host), mrq-data-blksz,
+   mrq-data-blocks, mrq-data-flags,
+   mrq-data-timeout_ns / 1000,
+   mrq-data-timeout_clks);
+   }
+
+   if (mrq-stop) {
+   pr_debug(%s: CMD%u arg %08x flags %08x\n,
+mmc_hostname(host), mrq-stop-opcode,
+mrq-stop-arg, mrq-stop-flags);
+   }
+
WARN_ON(!host-claimed);
 
mrq-cmd-error = 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


mmc: update kerneldoc

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=67a61c484735de9bf4f099830ecb4ef2eca95c38
Commit: 67a61c484735de9bf4f099830ecb4ef2eca95c38
Parent: 70f10482c668301c483acded13bf68780ad352b9
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Wed Jul 11 20:22:11 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 01:53:39 2007 +0200

mmc: update kerneldoc

Make sure the kerneldoc comments are up to date and relevant.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/core/core.c   |   31 +++
 drivers/mmc/core/host.c   |7 ++-
 drivers/mmc/core/sd_ops.c |2 +-
 include/linux/mmc/core.h  |2 +-
 4 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index b5d8a6d..e08aa35 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -140,7 +140,16 @@ static void mmc_wait_done(struct mmc_request *mrq)
complete(mrq-done_data);
 }
 
-int mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq)
+/**
+ * mmc_wait_for_req - start a request and wait for completion
+ * @host: MMC host to start command
+ * @mrq: MMC request to start
+ *
+ * Start a new MMC custom command request for a host, and wait
+ * for the command to complete. Does not attempt to parse the
+ * response.
+ */
+void mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq)
 {
DECLARE_COMPLETION_ONSTACK(complete);
 
@@ -150,8 +159,6 @@ int mmc_wait_for_req(struct mmc_host *host, struct 
mmc_request *mrq)
mmc_start_request(host, mrq);
 
wait_for_completion(complete);
-
-   return 0;
 }
 
 EXPORT_SYMBOL(mmc_wait_for_req);
@@ -192,6 +199,9 @@ EXPORT_SYMBOL(mmc_wait_for_cmd);
  * @data: data phase for command
  * @card: the MMC card associated with the data transfer
  * @write: flag to differentiate reads from writes
+ *
+ * Computes the data timeout parameters according to the
+ * correct algorithm given the card type.
  */
 void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card,
  int write)
@@ -240,15 +250,10 @@ void mmc_set_data_timeout(struct mmc_data *data, const 
struct mmc_card *card,
 EXPORT_SYMBOL(mmc_set_data_timeout);
 
 /**
- * __mmc_claim_host - exclusively claim a host
+ * mmc_claim_host - exclusively claim a host
  * @host: mmc host to claim
- * @card: mmc card to claim host for
- *
- * Claim a host for a set of operations.  If a valid card
- * is passed and this wasn't the last card selected, select
- * the card before returning.
  *
- * Note: you should use mmc_card_claim_host or mmc_claim_host.
+ * Claim a host for a set of operations.
  */
 void mmc_claim_host(struct mmc_host *host)
 {
@@ -498,8 +503,10 @@ void __mmc_release_bus(struct mmc_host *host)
  * @host: host which changed state.
  * @delay: optional delay to wait before detection (jiffies)
  *
- * All we know is that card(s) have been inserted or removed
- * from the socket(s).  We don't know which socket or cards.
+ * MMC drivers should call this when they detect a card has been
+ * inserted or removed. The MMC layer will confirm that any
+ * present card is still functional, and initialize any newly
+ * inserted.
  */
 void mmc_detect_change(struct mmc_host *host, unsigned long delay)
 {
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 1433d95..6a7e298 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -93,6 +93,10 @@ EXPORT_SYMBOL(mmc_alloc_host);
 /**
  * mmc_add_host - initialise host hardware
  * @host: mmc host
+ *
+ * Register the host with the driver model. The host must be
+ * prepared to start servicing requests before this function
+ * completes.
  */
 int mmc_add_host(struct mmc_host *host)
 {
@@ -126,7 +130,8 @@ EXPORT_SYMBOL(mmc_add_host);
  * @host: mmc host
  *
  * Unregister and remove all cards associated with this host,
- * and power down the MMC bus.
+ * and power down the MMC bus. No new requests will be issued
+ * after this function has returned.
  */
 void mmc_remove_host(struct mmc_host *host)
 {
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 848b5f5..ee9a1b9 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -25,7 +25,7 @@
  * mmc_wait_for_app_cmd - start an application command and wait for
   completion
  * @host: MMC host to start command
- * @rca: RCA to send MMC_APP_CMD to
+ * @card: Card to send MMC_APP_CMD to
  * @cmd: MMC command to start
  * @retries: maximum number of retries
  *
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 04bbe12..63a80ea 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ 

mmc: update header file paths

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=70f10482c668301c483acded13bf68780ad352b9
Commit: 70f10482c668301c483acded13bf68780ad352b9
Parent: b8352260d28b30cb2bb2df99814fb9c360e38901
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Wed Jul 11 20:04:50 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 01:53:31 2007 +0200

mmc: update header file paths

Make sure all headers in the files reflect their true position
in the tree.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/card/queue.c|2 +-
 drivers/mmc/core/mmc.c  |2 +-
 drivers/mmc/core/mmc_ops.c  |2 +-
 drivers/mmc/core/mmc_ops.h  |2 +-
 drivers/mmc/core/sd.c   |2 +-
 drivers/mmc/core/sd_ops.c   |2 +-
 drivers/mmc/core/sd_ops.h   |2 +-
 drivers/mmc/host/at91_mci.c |2 +-
 drivers/mmc/host/au1xmmc.c  |2 +-
 drivers/mmc/host/imxmmc.c   |2 +-
 drivers/mmc/host/mmci.c |2 +-
 drivers/mmc/host/mmci.h |2 +-
 drivers/mmc/host/omap.c |2 +-
 drivers/mmc/host/pxamci.c   |2 +-
 drivers/mmc/host/sdhci.c|2 +-
 drivers/mmc/host/sdhci.h|2 +-
 drivers/mmc/host/wbsd.c |2 +-
 drivers/mmc/host/wbsd.h |2 +-
 18 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index b53dac8..9f2b20f 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/queue.c
+ *  linux/drivers/mmc/card/queue.c
  *
  *  Copyright (C) 2003 Russell King, All Rights Reserved.
  *  Copyright 2006-2007 Pierre Ossman
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 66f85bf..1a889e9 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/mmc.c
+ *  linux/drivers/mmc/core/mmc.c
  *
  *  Copyright (C) 2003-2004 Russell King, All Rights Reserved.
  *  Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved.
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 7dd720f..913e75f 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/mmc_ops.h
+ *  linux/drivers/mmc/core/mmc_ops.h
  *
  *  Copyright 2006-2007 Pierre Ossman
  *
diff --git a/drivers/mmc/core/mmc_ops.h b/drivers/mmc/core/mmc_ops.h
index 7a481e8..76d09a9 100644
--- a/drivers/mmc/core/mmc_ops.h
+++ b/drivers/mmc/core/mmc_ops.h
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/mmc_ops.h
+ *  linux/drivers/mmc/core/mmc_ops.h
  *
  *  Copyright 2006-2007 Pierre Ossman
  *
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 1240684..df3bbfe 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/sd.c
+ *  linux/drivers/mmc/core/sd.c
  *
  *  Copyright (C) 2003-2004 Russell King, All Rights Reserved.
  *  SD support Copyright (C) 2004 Ian Molton, All Rights Reserved.
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 9697ce5..848b5f5 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/sd_ops.h
+ *  linux/drivers/mmc/core/sd_ops.h
  *
  *  Copyright 2006-2007 Pierre Ossman
  *
diff --git a/drivers/mmc/core/sd_ops.h b/drivers/mmc/core/sd_ops.h
index 1240fdd..09ca52f 100644
--- a/drivers/mmc/core/sd_ops.h
+++ b/drivers/mmc/core/sd_ops.h
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/sd_ops.h
+ *  linux/drivers/mmc/core/sd_ops.h
  *
  *  Copyright 2006-2007 Pierre Ossman
  *
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 15aab37..62564cc 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/at91_mci.c - ATMEL AT91 MCI Driver
+ *  linux/drivers/mmc/host/at91_mci.c - ATMEL AT91 MCI Driver
  *
  *  Copyright (C) 2005 Cougar Creek Computing Devices Ltd, All Rights Reserved
  *
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 52b63f1..34c99d4 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/mmc/au1xmmc.c - AU1XX0 MMC driver
+ * linux/drivers/mmc/host/au1xmmc.c - AU1XX0 MMC driver
  *
  *  Copyright (c) 2005, Advanced Micro Devices, Inc.
  *
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index 7ee2045..54bfc9f 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mmc/imxmmc.c - Motorola i.MX MMCI driver
+ *  linux/drivers/mmc/host/imxmmc.c - Motorola i.MX MMCI driver
  *
  *  Copyright (C) 2004 Sascha Hauer, Pengutronix [EMAIL PROTECTED]
  *  Copyright (C) 2006 Pavel Pisa, PiKRON [EMAIL PROTECTED]
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index d11c2d2..be730c0 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1,5 +1,5 @@
 /*
- *  

[POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1c813123f3beebcffb8446929e0e917defda67f
Commit: d1c813123f3beebcffb8446929e0e917defda67f
Parent: 10ce8c69d09c8dcdebe926adb2e7d28f540e2939
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 00:43:36 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:43:36 2007 -0500

[POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM

BootX text code is only supported on systems with real OF at this point
which is PPC_OF  PPC_MULTIPLATFORM.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/Kconfig.debug |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 346cd3b..5c71624 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -134,7 +134,7 @@ config BDI_SWITCH
 
 config BOOTX_TEXT
bool Support for early boot text console (BootX or OpenFirmware only)
-   depends PPC_OF
+   depends PPC_OF  PPC_MULTIPLATFORM
help
  Say Y here to see progress messages from the boot firmware in text
  mode. Requires either BootX or Open Firmware.
-
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


[POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10ce8c69d09c8dcdebe926adb2e7d28f540e2939
Commit: 10ce8c69d09c8dcdebe926adb2e7d28f540e2939
Parent: 006af9e229bf28b59c451e8370deca87c7cc3ee6
Author: Roy Zang [EMAIL PROTECTED]
AuthorDate: Fri Jul 13 17:35:33 2007 +0800
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:19:57 2007 -0500

[POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards

Add global-utilities node with has-rstcr on MPC8544 DS and MPC8568 MDS
boards so they are able to reset properly.

Signed-off-by: Roy Zang [EMAIL PROTECTED]
Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/mpc8544ds.dts  |6 ++
 arch/powerpc/boot/dts/mpc8568mds.dts |6 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts 
b/arch/powerpc/boot/dts/mpc8544ds.dts
index d8ee4a0..4680e20 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -350,6 +350,12 @@
 
};
 
+   [EMAIL PROTECTED] { //global utilities block
+   compatible = fsl,mpc8548-guts;
+   reg = e 1000;
+   fsl,has-rstcr;
+   };
+
mpic: [EMAIL PROTECTED] {
clock-frequency = 0;
interrupt-controller;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts 
b/arch/powerpc/boot/dts/mpc8568mds.dts
index 99fa5a0..b1dcfbe 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -170,6 +170,12 @@
interrupt-parent = mpic;
};
 
+   [EMAIL PROTECTED] { //global utilities block
+   compatible = fsl,mpc8548-guts;
+   reg = e 1000;
+   fsl,has-rstcr;
+   };
+
[EMAIL PROTECTED] {
interrupt-map-mask = f800 0 0 7;
interrupt-map = 
-
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


[POWERPC] Fix mpc7448hpc2 tsi108 device_type bug

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=006af9e229bf28b59c451e8370deca87c7cc3ee6
Commit: 006af9e229bf28b59c451e8370deca87c7cc3ee6
Parent: 282045b45060d5a8be0ebd13c1506551c6a0a0b8
Author: Roy Zang [EMAIL PROTECTED]
AuthorDate: Wed Jul 11 14:39:17 2007 +0800
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:17:02 2007 -0500

[POWERPC] Fix mpc7448hpc2 tsi108 device_type bug

Fix mpc7448hpc2 tsi108 device_type bug.
Wrong device type will break the board startup.

Signed-off-by: Roy Zang [EMAIL PROTECTED]
Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/mpc7448hpc2.dts |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts 
b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 0e3d314..b9158eb 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -45,7 +45,7 @@
#address-cells = 1;
#size-cells = 1;
#interrupt-cells = 2;
-   device_type = tsi108-bridge;
+   device_type = tsi-bridge;
ranges =  c000 0001;
reg = c000 0001;
bus-frequency = 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


[POWREPC] Fixup a number of modpost warnings on ppc32

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=282045b45060d5a8be0ebd13c1506551c6a0a0b8
Commit: 282045b45060d5a8be0ebd13c1506551c6a0a0b8
Parent: 9a9bcf4e00281cd135e69f8d996acbbeb5aef6d0
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 00:16:05 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:16:21 2007 -0500

[POWREPC] Fixup a number of modpost warnings on ppc32

Fixed the following warnings:

WARNING: vmlinux.o(.text+0x2934): Section mismatch: reference to 
.init.text:__alloc_bootmem (between 'irq_alloc_host' and 'irq_set_default_host')
WARNING: vmlinux.o(.text+0xb2aa): Section mismatch: reference to 
.init.data:boot_command_line (between 'register_early_udbg_console' and 
'udbg_printf')
WARNING: vmlinux.o(.text+0xb2b2): Section mismatch: reference to 
.init.data:boot_command_line (between 'register_early_udbg_console' and 
'udbg_printf')
WARNING: vmlinux.o(.text+0xe354): Section mismatch: reference to 
.init.text:__alloc_bootmem (between 'pcibios_alloc_controller' and 
'pci_domain_nr')
WARNING: vmlinux.o(.text+0x12768): Section mismatch: reference to 
.init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 
'indirect_read_config')
WARNING: vmlinux.o(.text+0x127a8): Section mismatch: reference to 
.init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 
'indirect_read_config')
WARNING: vmlinux.o(.text+0x17566c): Section mismatch: reference to 
.init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 
'pci_scan_bus_parented')

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/kernel/irq.c|8 
 arch/powerpc/kernel/pci-common.c |2 +-
 arch/powerpc/kernel/pci_32.c |2 +-
 arch/powerpc/kernel/udbg.c   |2 +-
 arch/powerpc/sysdev/fsl_pci.c|2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2fc8786..24bea97 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
 }
 EXPORT_SYMBOL_GPL(virq_to_hw);
 
-struct irq_host *irq_alloc_host(unsigned int revmap_type,
-   unsigned int revmap_arg,
-   struct irq_host_ops *ops,
-   irq_hw_number_t inval_irq)
+__init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type,
+   unsigned int revmap_arg,
+   struct irq_host_ops *ops,
+   irq_hw_number_t inval_irq)
 {
struct irq_host *host;
unsigned int size = sizeof(struct irq_host);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index fe7d125..7b41a99 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct 
pci_controller *hose)
spin_unlock(hose_spinlock);
 }
 
-struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
+__init_refok struct pci_controller * pcibios_alloc_controller(struct 
device_node *dev)
 {
struct pci_controller *phb;
 
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 395086f..cd35c96 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1247,7 +1247,7 @@ pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-void __init pcibios_fixup_bus(struct pci_bus *bus)
+void pcibios_fixup_bus(struct pci_bus *bus)
 {
struct pci_controller *hose = (struct pci_controller *) bus-sysdata;
unsigned long io_offset;
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index cbca1df..0f9b4ea 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -155,7 +155,7 @@ static int early_console_initialized;
  * Called by setup_system after ppc_md-probe and ppc_md-early_init.
  * Call it again after setting udbg_putc in ppc_md-setup_arch.
  */
-void register_early_udbg_console(void)
+void __init register_early_udbg_console(void)
 {
if (early_console_initialized)
return;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 8712227..9fb0ce5 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -107,7 +107,7 @@ void __init setup_pci_cmd(struct pci_controller *hose)
}
 }
 
-static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev)
+static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev)
 {
struct resource *res;
int i, res_idx = PCI_BRIDGE_RESOURCES;
-
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  

[POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2052d6d25decc04dc05beb99348b3d78f6e3490d
Commit: 2052d6d25decc04dc05beb99348b3d78f6e3490d
Parent: 7659c038d3d0a635b5aeff04aed523d7b6c1dde8
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 00:44:11 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Wed Jul 25 23:02:06 2007 -0500

[POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB

The Freescale PCI PHBs actual report back values in the BAR registers
this causes issues in that we try to allocate resources for them
and will get error messages like the following on MPC8544 DS:

PCI: Failed to allocate mem resource #1:[EMAIL PROTECTED] for :00:00.0

To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal
header type, and the PHB we clear out all the resources.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/kernel/pci_32.c |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 721a694..395086f 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list);
 static int pci_bus_count;
 
 static void
+fixup_hide_host_resource_fsl(struct pci_dev* dev)
+{
+   int i, class = dev-class  8;
+
+   if ((class == PCI_CLASS_PROCESSOR_POWERPC) 
+   (dev-hdr_type == PCI_HEADER_TYPE_NORMAL) 
+   (dev-bus-parent == NULL)) {
+   for (i = 0; i  DEVICE_COUNT_RESOURCE; i++) {
+   dev-resource[i].start = 0;
+   dev-resource[i].end = 0;
+   dev-resource[i].flags = 0;
+   }
+   }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, 
fixup_hide_host_resource_fsl); 
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, 
fixup_hide_host_resource_fsl); 
+
+static void
 fixup_broken_pcnet32(struct pci_dev* dev)
 {
if ((dev-class8 == PCI_CLASS_NETWORK_ETHERNET)) {
-
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


[POWERPC] Fix Pegasos keyboard detection

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5d834fc34e61f1a40435981062000e5d2b2baa8
Commit: f5d834fc34e61f1a40435981062000e5d2b2baa8
Parent: 16782a604c458e1edcefca52457a82395b788bed
Author: Alan Curry [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 11:28:32 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:45 2007 +1000

[POWERPC] Fix Pegasos keyboard detection

As of 2.6.22 the kernel doesn't recognize the i8042 keyboard/mouse
controller on the PegasosPPC.  This is because of a feature/bug in the
OF device tree: the device_type attribute is an empty string instead
of 8042 as the kernel expects.  This adds a secondary detection
which looks for a device whose *name* is 8042 if there is no device
whose *type* is 8042.

Signed-off-by: Alan Curry [EMAIL PROTECTED]
Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/setup-common.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/setup-common.c 
b/arch/powerpc/kernel/setup-common.c
index 4924c48..50ef38c 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -496,6 +496,10 @@ int check_legacy_ioport(unsigned long base_port)
break;
}
np = of_find_node_by_type(NULL, 8042);
+   /* Pegasos has no device_type on its 8042 node, look for the
+* name instead */
+   if (!np)
+   np = of_find_node_by_name(NULL, 8042);
break;
case FDC_BASE: /* FDC1 */
np = of_find_node_by_type(NULL, fdc);
-
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


[POWERPC] iSeries: Fix section mismatch warning in lpevents

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16782a604c458e1edcefca52457a82395b788bed
Commit: 16782a604c458e1edcefca52457a82395b788bed
Parent: c40b91b59de079583cde5f0c8e2c96d8af0f76a7
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 09:29:19 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:12:18 2007 +1000

[POWERPC] iSeries: Fix section mismatch warning in lpevents

WARNING: vmlinux.o(.text+0x4f568): Section mismatch: reference to 
.init.text:.__alloc_bootmem (between '.setup_hvlpevent_queue' and 
'.process_hvlpevents')

setup_hvlpevent_queue is only called from __init code so make it __init
as well.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/iseries/lpevents.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/lpevents.c 
b/arch/powerpc/platforms/iseries/lpevents.c
index 91df52a..34bdbbe 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -182,7 +182,7 @@ static int set_spread_lpevents(char *str)
 }
 __setup(spread_lpevents=, set_spread_lpevents);
 
-void setup_hvlpevent_queue(void)
+void __init setup_hvlpevent_queue(void)
 {
void *eventStack;
 
-
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


Revert [POWERPC] Don't complain if size-cells == 0 in prom_parse()

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77926826f301fbd8ed96d3cd9ff17a5b59560dfb
Commit: 77926826f301fbd8ed96d3cd9ff17a5b59560dfb
Parent: e4903fb59590f86190280a549420f6cb85bd7f7e
Author: Paul Mackerras [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:44:36 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:44:36 2007 +1000

Revert [POWERPC] Don't complain if size-cells == 0 in prom_parse()

This reverts commit fd6e9d3945ee122eb513ada8b17296d243c1ce5e.

Having #size-cells == 0 in a node indicates that things under the
node aren't directly accessible, and therefore we shouldn't try to
translate addresses for devices under the node into CPU physical
addresses.

Some drivers, such as the nvram driver for powermacs, rely on
of_address_to_resource failing if they are called for a node
representing a device whose resources aren't directly accessible
by the CPU.  These drivers were broken by commit fd6e9d39,
resulting in the Lombard powerbook hanging early in the boot
process.

Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/prom_parse.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 3786dcc..b5c96af 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -24,7 +24,7 @@
 /* Max address size we deal with */
 #define OF_MAX_ADDR_CELLS  4
 #define OF_CHECK_COUNTS(na, ns)((na)  0  (na) = OF_MAX_ADDR_CELLS 
 \
-   (ns) = 0)
+   (ns)  0)
 
 static struct of_bus *of_match_bus(struct device_node *np);
 static int __of_address_to_resource(struct device_node *dev,
-
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


[POWERPC] Fix RTC and device tree on linkstation machines

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2d32db3443157e8f50c7c86b8ff1477c27d6e3e
Commit: f2d32db3443157e8f50c7c86b8ff1477c27d6e3e
Parent: d13ae8620dfdedfa7e9ab6d1eec294adc0516065
Author: Guennadi Liakhovetski [EMAIL PROTECTED]
AuthorDate: Sun Jul 22 08:43:11 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:12:17 2007 +1000

[POWERPC] Fix RTC and device tree on linkstation machines

This fixes the RTC on linkstation ppc machines again, and updates the
device tree: add rtc nodes on i2c, remove bogus 0-size cache-line
declarations, rename interrupt-controller nodes, remove erroneous
interrupt-parent line, accidentally introduced by a recent patch.

Signed-off-by: G. Liakhovetski [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/kuroboxHD.dts |   18 --
 arch/powerpc/boot/dts/kuroboxHG.dts |   19 ---
 2 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts 
b/arch/powerpc/boot/dts/kuroboxHD.dts
index a983680..1225374 100644
--- a/arch/powerpc/boot/dts/kuroboxHD.dts
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -33,12 +33,10 @@ build with: dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 
kuroboxHD.dts
PowerPC,603e { /* Really 8241 */
device_type = cpu;
reg = 0;
-   clock-frequency = bebc200;/* Fixed by bootwrapper 
*/
-   timebase-frequency = 1743000; /* Fixed by bootwrapper 
*/
-   bus-frequency = 0;/* From bootloader */
+   clock-frequency = bebc200;/* Fixed by bootloader 
*/
+   timebase-frequency = 1743000; /* Fixed by bootloader 
*/
+   bus-frequency = 0;/* Fixed by bootloader 
*/
/* Following required by dtc but not used */
-   i-cache-line-size = 0;
-   d-cache-line-size = 0;
i-cache-size = 4000;
d-cache-size = 4000;
};
@@ -64,11 +62,19 @@ build with: dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 
kuroboxHD.dts
  fef0 fef0 0010;  /* pci iack */
 
[EMAIL PROTECTED] {
+   #address-cells = 1;
+   #size-cells = 0;
device_type = i2c;
compatible = fsl-i2c;
reg = 80003000 1000;
interrupts = 5 2;
interrupt-parent = mpic;
+
+   [EMAIL PROTECTED] {
+   device_type = rtc;
+   compatible = ricoh,rs5c372b;
+   reg = 32;
+   };
};
 
[EMAIL PROTECTED] {
@@ -91,7 +97,7 @@ build with: dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 
kuroboxHD.dts
interrupt-parent = mpic;
};
 
-   mpic: [EMAIL PROTECTED] {
+   mpic: [EMAIL PROTECTED] {
#interrupt-cells = 2;
#address-cells = 0;
device_type = open-pic;
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts 
b/arch/powerpc/boot/dts/kuroboxHG.dts
index 5cf42dc..579aa8b 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -33,12 +33,10 @@ build with: dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 
kuroboxHG.dts
PowerPC,603e { /* Really 8241 */
device_type = cpu;
reg = 0;
-   clock-frequency = fdad680;/* Fixed by bootwrapper 
*/
-   timebase-frequency = 1F04000; /* Fixed by bootwrapper 
*/
-   bus-frequency = 0;/* From bootloader */
+   clock-frequency = fdad680;/* Fixed by bootloader 
*/
+   timebase-frequency = 1F04000; /* Fixed by bootloader 
*/
+   bus-frequency = 0;/* Fixed by bootloader 
*/
/* Following required by dtc but not used */
-   i-cache-line-size = 0;
-   d-cache-line-size = 0;
i-cache-size = 4000;
d-cache-size = 4000;
};
@@ -64,11 +62,19 @@ build with: dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 
kuroboxHG.dts
  fef0 fef0 0010;  /* pci iack */
 
[EMAIL PROTECTED] {
+   #address-cells = 1;
+   #size-cells = 0;
device_type = i2c;
compatible = fsl-i2c;
reg = 

[POWERPC] iSeries: We need vio_enable_interrupts

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56a4c6e31a25a218c066d8da27558a86310bbfd7
Commit: 56a4c6e31a25a218c066d8da27558a86310bbfd7
Parent: f2d32db3443157e8f50c7c86b8ff1477c27d6e3e
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Mon Jul 23 11:55:32 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:12:17 2007 +1000

[POWERPC] iSeries: We need vio_enable_interrupts

Commit 3d0e91f7ace12499c4b00088e9a6b1361e1bb0ca introduced a requirement
for vio_enable_interrupts which iSeires has never needed.  So create a
dummy one.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 include/asm-powerpc/vio.h |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h
index 0117b54..3a0975e 100644
--- a/include/asm-powerpc/vio.h
+++ b/include/asm-powerpc/vio.h
@@ -80,6 +80,11 @@ extern const void *vio_get_attribute(struct vio_dev *vdev, 
char *which,
 extern struct vio_dev *vio_find_node(struct device_node *vnode);
 extern int vio_enable_interrupts(struct vio_dev *dev);
 extern int vio_disable_interrupts(struct vio_dev *dev);
+#else
+static inline int vio_enable_interrupts(struct vio_dev *dev)
+{
+   return 0;
+}
 #endif
 
 static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
-
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


[POWERPC] iSeries: Fix section mismatch warnings

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c40b91b59de079583cde5f0c8e2c96d8af0f76a7
Commit: c40b91b59de079583cde5f0c8e2c96d8af0f76a7
Parent: 56a4c6e31a25a218c066d8da27558a86310bbfd7
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 09:27:35 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:12:17 2007 +1000

[POWERPC] iSeries: Fix section mismatch warnings

WARNING: vmlinux.o(.text+0x8124): Section mismatch: reference to 
.init.text:.iSeries_early_setup (between '.__start_initialization_iSeries' and 
'.__mmu_off')
WARNING: vmlinux.o(.text+0x8128): Section mismatch: reference to 
.init.text:.early_setup (between '.__start_initialization_iSeries' and 
'.__mmu_off')

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/head_64.S |7 ---
 include/asm-powerpc/ppc_asm.h |   12 
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 8cdd48e..1448af9 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -809,8 +809,9 @@ system_reset_iSeries:
mtmsrd  r24 /* RI on */
lhz r24,PACAPACAINDEX(r13)  /* Get processor # */
cmpwi   0,r24,0 /* Are we processor 0? */
-   beq .__start_initialization_iSeries /* Start up the first processor 
*/
-   mfspr   r4,SPRN_CTRLF
+   bne 1f
+   b   .__start_initialization_iSeries /* Start up the first processor 
*/
+1: mfspr   r4,SPRN_CTRLF
li  r5,CTRL_RUNLATCH/* Turn off the run light */
andcr4,r4,r5
mtspr   SPRN_CTRLT,r4
@@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init)
 #endif
 
 #ifdef CONFIG_PPC_ISERIES
-_STATIC(__start_initialization_iSeries)
+_INIT_STATIC(__start_initialization_iSeries)
/* Clear out the BSS */
LOAD_REG_IMMEDIATE(r11,__bss_stop)
LOAD_REG_IMMEDIATE(r8,__bss_start)
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index fa083d8..6532572 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -181,6 +181,18 @@ name: \
.type GLUE(.,name),@function; \
 GLUE(.,name):
 
+#define _INIT_STATIC(name) \
+   .section .text.init.refok; \
+   .align 2 ; \
+   .section .opd,aw; \
+name: \
+   .quad GLUE(.,name); \
+   .quad [EMAIL PROTECTED]; \
+   .quad 0; \
+   .previous; \
+   .type GLUE(.,name),@function; \
+GLUE(.,name):
+
 #else /* 32-bit */
 
 #define _GLOBAL(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


[POWERPC] Fix Maple platform ISA bus

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17cd87c26bd86546ea3217397ef3428581970058
Commit: 17cd87c26bd86546ea3217397ef3428581970058
Parent: 50747cb8189d54369d75e1bd73f84db431d39af8
Author: Benjamin Herrenschmidt [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 14:07:14 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:49 2007 +1000

[POWERPC] Fix Maple platform ISA bus

The Maple platform has ISA IOs but didn't call the new functions to
actually map those, thus crashing when trying to access the nvram.

This fixes Maple and JS2x using SLOF.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/maple/pci.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/maple/pci.c 
b/arch/powerpc/platforms/maple/pci.c
index fceaae4..2542403 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -490,6 +490,9 @@ static int __init maple_add_bridge(struct device_node *dev)
/* Fixup bus-range OF property */
fixup_bus_range(dev);
 
+   /* Check for legacy IOs */
+   isa_bridge_find_early(hose);
+
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


sun userflash is PCI-dependent

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0e5de00b0ee5a3b652d829f2c1e89265e9c6a99
Commit: e0e5de00b0ee5a3b652d829f2c1e89265e9c6a99
Parent: 52cf875fb0f3a8a472eaa8be479777cf0a92e3ce
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:09 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

sun userflash is PCI-dependent

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/mtd/maps/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index f88ebc5..cc6c734 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -103,7 +103,7 @@ config MTD_PMC_MSP_RAMROOT
 
 config MTD_SUN_UFLASH
tristate Sun Microsystems userflash support
-   depends on SPARC  MTD_CFI
+   depends on SPARC  MTD_CFI  PCI
help
  This provides a 'mapping' driver which supports the way in
  which user-programmable flash chips are connected on various
-
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 unused mach_trap_init

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65fdef9303a69dab1f693159f6262375322dd676
Commit: 65fdef9303a69dab1f693159f6262375322dd676
Parent: c52a2cda561fd40543d839e8e0c75b6d964a67ad
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: remove unused mach_trap_init

Remove the unused mach_trap_init function pointer. All use of it
removed with change to using generic irq framework.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/kernel/setup.c   |2 --
 include/asm-m68knommu/machdep.h |1 -
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index a5ac0d4..3f86ade 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -42,8 +42,6 @@ EXPORT_SYMBOL(memory_end);
 
 char __initdata command_line[COMMAND_LINE_SIZE];
 
-void (*mach_trap_init)(void);
-
 /* machine dependent timer functions */
 void (*mach_sched_init)(irq_handler_t handler);
 void (*mach_tick)(void);
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h
index 6ce28f8..2b75a30 100644
--- a/include/asm-m68knommu/machdep.h
+++ b/include/asm-m68knommu/machdep.h
@@ -48,6 +48,5 @@ extern char *mach_sysrq_xlate;
 
 extern void config_BSP(char *command, int len);
 extern void (*mach_tick)(void);
-extern void (*mach_trap_init)(void);
 
 #endif /* _M68KNOMMU_MACHDEP_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: use setup_irq() in ColdFire simple timer

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c52a2cda561fd40543d839e8e0c75b6d964a67ad
Commit: c52a2cda561fd40543d839e8e0c75b6d964a67ad
Parent: 374c3f552d7c7731cf25b0d4938e9d14d9251bf4
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: use setup_irq() in ColdFire simple timer

Use setup_irq() instead of request_irq() to set up system timer
in ColdFire simple timer code. With the old m68knommu irq code this
was safe, but it is not now within the generic irq framework.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/5307/timers.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/m68knommu/platform/5307/timers.c 
b/arch/m68knommu/platform/5307/timers.c
index fb66ead..64bd0ff 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -3,7 +3,7 @@
 /*
  * timers.c -- generic ColdFire hardware timer support.
  *
- * Copyright (C) 1999-2006, Greg Ungerer ([EMAIL PROTECTED])
+ * Copyright (C) 1999-2007, Greg Ungerer ([EMAIL PROTECTED])
  */
 
 /***/
@@ -13,8 +13,8 @@
 #include linux/param.h
 #include linux/interrupt.h
 #include linux/init.h
+#include linux/irq.h
 #include asm/io.h
-#include asm/irq.h
 #include asm/traps.h
 #include asm/machdep.h
 #include asm/coldfire.h
@@ -62,17 +62,24 @@ void coldfire_tick(void)
 
 /***/
 
+static struct irqaction coldfire_timer_irq = {
+.name= timer,
+.flags   = IRQF_DISABLED | IRQF_TIMER,
+};
+
 static int ticks_per_intr;
 
 void coldfire_timer_init(irq_handler_t handler)
 {
+   coldfire_timer_irq.handler = handler;
+   setup_irq(mcf_timervector, coldfire_timer_irq);
+
__raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
ticks_per_intr = (MCF_BUSCLK / 16) / HZ;
__raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR));
__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
 
-   request_irq(mcf_timervector, handler, IRQF_DISABLED, timer, NULL);
mcf_settimericr(1, mcf_timerlevel);
 
 #ifdef CONFIG_HIGHPROFILE
-
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 use of colfire_trap_init

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=374c3f552d7c7731cf25b0d4938e9d14d9251bf4
Commit: 374c3f552d7c7731cf25b0d4938e9d14d9251bf4
Parent: aa1f1d10e6f80362123fd7f736011f3ddd3acf25
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: remove use of colfire_trap_init

The switch to using the generic irq framework removed the
coldfire_trap_init() code, so remove all references to it.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/5206/config.c  |2 --
 arch/m68knommu/platform/5206e/config.c |2 --
 arch/m68knommu/platform/520x/config.c  |2 --
 arch/m68knommu/platform/523x/config.c  |2 --
 arch/m68knommu/platform/5249/config.c  |2 --
 arch/m68knommu/platform/5272/config.c  |2 --
 arch/m68knommu/platform/527x/config.c  |2 --
 arch/m68knommu/platform/528x/config.c  |2 --
 arch/m68knommu/platform/5307/config.c  |2 --
 arch/m68knommu/platform/532x/config.c  |2 --
 arch/m68knommu/platform/5407/config.c  |2 --
 11 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/arch/m68knommu/platform/5206/config.c 
b/arch/m68knommu/platform/5206/config.c
index d265ed4..d0f2dc5 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -28,7 +28,6 @@
 void coldfire_tick(void);
 void coldfire_timer_init(irq_handler_t handler);
 unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
 void coldfire_reset(void);
 
 /***/
@@ -101,7 +100,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
-   mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
 }
 
diff --git a/arch/m68knommu/platform/5206e/config.c 
b/arch/m68knommu/platform/5206e/config.c
index 7fa5e82..4ab614f 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -27,7 +27,6 @@
 void coldfire_tick(void);
 void coldfire_timer_init(irq_handler_t handler);
 unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
 void coldfire_reset(void);
 
 /***/
@@ -107,7 +106,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
-   mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
 }
 
diff --git a/arch/m68knommu/platform/520x/config.c 
b/arch/m68knommu/platform/520x/config.c
index 85830f9..a2c95be 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -30,7 +30,6 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
 void coldfire_pit_tick(void);
 void coldfire_pit_init(irq_handler_t handler);
 unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
 void coldfire_reset(void);
 
 /***/
@@ -51,7 +50,6 @@ void config_BSP(char *commandp, int size)
 mach_sched_init = coldfire_pit_init;
 mach_tick = coldfire_pit_tick;
 mach_gettimeoffset = coldfire_pit_offset;
-mach_trap_init = coldfire_trap_init;
 mach_reset = coldfire_reset;
 }
 
diff --git a/arch/m68knommu/platform/523x/config.c 
b/arch/m68knommu/platform/523x/config.c
index c0157e1..0a3af05 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -29,7 +29,6 @@
 void coldfire_pit_tick(void);
 void coldfire_pit_init(irq_handler_t handler);
 unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
 void coldfire_reset(void);
 
 /***/
@@ -66,7 +65,6 @@ void config_BSP(char *commandp, int size)
mach_sched_init = coldfire_pit_init;
mach_tick = coldfire_pit_tick;
mach_gettimeoffset = coldfire_pit_offset;
-   mach_trap_init = coldfire_trap_init;
mach_reset = coldfire_reset;
 }
 
diff --git a/arch/m68knommu/platform/5249/config.c 
b/arch/m68knommu/platform/5249/config.c
index 4cdeb71..dc2c362 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -27,7 +27,6 @@
 void coldfire_tick(void);
 void coldfire_timer_init(irq_handler_t handler);
 unsigned long coldfire_timer_offset(void);
-void coldfire_trap_init(void);
 void coldfire_reset(void);
 
 /***/
@@ -99,7 +98,6 @@ void config_BSP(char *commandp, int size)

Don't force-enable suspend/hibernate support just for ACPI

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=293a032eb95f3c6c212c1541e94c14b111731313
Commit: 293a032eb95f3c6c212c1541e94c14b111731313
Parent: 58b3b71dfaaecbf7cff1fe10c049d663f0313e5f
Author: Linus Torvalds [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:44:58 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:44:58 2007 -0700

Don't force-enable suspend/hibernate support just for ACPI

It's a totally independent decision for the user whether he wants
suspend and/or hibernation support, and ACPI shouldn't care.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/acpi/Kconfig |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 251344c..22b401b 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -11,9 +11,6 @@ menuconfig ACPI
depends on PCI
depends on PM
select PNP
-   # for sleep
-   select HOTPLUG_CPU if X86  SMP
-   select SUSPEND_SMP if X86  SMP
default y
---help---
  Advanced Configuration and Power Interface (ACPI) support for 
-
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


drivers/edac: fix pasemi kconfig depends

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ddcc3050bddc267f8d6e811bd930e885729f900b
Commit: ddcc3050bddc267f8d6e811bd930e885729f900b
Parent: 39c29657fcf6060d71e04f1e52e5bb4b2999644f
Author: Doug Thompson [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:16 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

drivers/edac: fix pasemi kconfig depends

Fixed 'depends on PPC_PASEMI' in EDAC Kconfig.  Module PASEMI depends ONLY 
on
the PASEMI on PPC.

Was previously enabled for ALL PPC

Cc: Alan Cox [EMAIL PROTECTED]
Cc: Egor N. Martovetsky [EMAIL PROTECTED]
Signed-off-by: Doug Thompson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/edac/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 43dd5a3..98b6b4f 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -126,7 +126,7 @@ config EDAC_I5000
 config EDAC_PASEMI
tristate PA Semi PWRficient
depends on EDAC_MM_EDAC  PCI
-   depends on PPC
+   depends on PPC_PASEMI
help
  Support for error detection and correction on PA Semi
  PWRficient.
-
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


drivers/edac: fix edac_pci sysfs

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4c1465b7de9686c4c5aa533b15c09ab014aab3a
Commit: d4c1465b7de9686c4c5aa533b15c09ab014aab3a
Parent: bce19683c17485b584b62b984d6dcf5332181588
Author: Doug Thompson [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:15 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

drivers/edac: fix edac_pci sysfs

This patch fixes sysfs exit code for the EDAC PCI device in a similiar 
manner
and the previous fixes for EDAC_MC and EDAC_DEVICE.

It removes the old (and incorrect) completion model and uses reference 
counts
on per instance kobjects and on the edac core module.

This pattern was applied to the edac_mc and edac_device code, but the EDAC 
PCI
code was missed.  In addition, this fixes a system hang after a low level
driver was unloaded.  (A cleanup function was called twice, which really
screwed things up)

Cc: Greg KH [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by:  Doug Thompson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/edac/edac_module.h|6 +
 drivers/edac/edac_pci.c   |  162 +++---
 drivers/edac/edac_pci_sysfs.c |  297 ++---
 3 files changed, 337 insertions(+), 128 deletions(-)

diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h
index 3664ae9..cbc419c 100644
--- a/drivers/edac/edac_module.h
+++ b/drivers/edac/edac_module.h
@@ -66,6 +66,10 @@ extern int edac_sysfs_pci_setup(void);
 extern void edac_sysfs_pci_teardown(void);
 extern int edac_pci_get_check_errors(void);
 extern int edac_pci_get_poll_msec(void);
+extern void edac_pci_remove_sysfs(struct edac_pci_ctl_info *pci);
+extern void edac_pci_handle_pe(struct edac_pci_ctl_info *pci, const char *msg);
+extern void edac_pci_handle_npe(struct edac_pci_ctl_info *pci,
+   const char *msg);
 #else  /* CONFIG_PCI */
 /* pre-process these away */
 #define edac_pci_do_parity_check()
@@ -74,6 +78,8 @@ extern int edac_pci_get_poll_msec(void);
 #define edac_sysfs_pci_teardown()
 #define edac_pci_get_check_errors()
 #define edac_pci_get_poll_msec()
+#define edac_pci_handle_pe()
+#define edac_pci_handle_npe()
 #endif /* CONFIG_PCI */
 
 #endif /* __EDAC_MODULE_H__ */
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index d9cd5e0..5dee9f5 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -31,20 +31,12 @@
 static DEFINE_MUTEX(edac_pci_ctls_mutex);
 static struct list_head edac_pci_list = LIST_HEAD_INIT(edac_pci_list);
 
-static inline void edac_lock_pci_list(void)
-{
-   mutex_lock(edac_pci_ctls_mutex);
-}
-
-static inline void edac_unlock_pci_list(void)
-{
-   mutex_unlock(edac_pci_ctls_mutex);
-}
-
 /*
- * The alloc() and free() functions for the 'edac_pci' control info
- * structure. The chip driver will allocate one of these for each
- * edac_pci it is going to control/register with the EDAC CORE.
+ * edac_pci_alloc_ctl_info
+ *
+ * The alloc() function for the 'edac_pci' control info
+ * structure. The chip driver will allocate one of these for each
+ * edac_pci it is going to control/register with the EDAC CORE.
  */
 struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned int sz_pvt,
const char *edac_pci_name)
@@ -53,47 +45,59 @@ struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned 
int sz_pvt,
void *pvt;
unsigned int size;
 
+   debugf1(%s()\n, __func__);
+
pci = (struct edac_pci_ctl_info *)0;
pvt = edac_align_ptr(pci[1], sz_pvt);
size = ((unsigned long)pvt) + sz_pvt;
 
-   if ((pci = kzalloc(size, GFP_KERNEL)) == NULL)
+   /* Alloc the needed control struct memory */
+   pci = kzalloc(size, GFP_KERNEL);
+   if (pci  == NULL)
return NULL;
 
+   /* Now much private space */
pvt = sz_pvt ? ((char *)pci) + ((unsigned long)pvt) : NULL;
 
pci-pvt_info = pvt;
-
pci-op_state = OP_ALLOC;
 
snprintf(pci-name, strlen(edac_pci_name) + 1, %s, edac_pci_name);
 
return pci;
 }
-
 EXPORT_SYMBOL_GPL(edac_pci_alloc_ctl_info);
 
 /*
  * edac_pci_free_ctl_info()
- * frees the memory allocated by edac_pci_alloc_ctl_info() function
+ *
+ * Last action on the pci control structure.
+ *
+ * call the remove sysfs informaton, which will unregister
+ * this control struct's kobj. When that kobj's ref count
+ * goes to zero, its release function will be call and then
+ * kfree() the memory.
  */
 void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci)
 {
-   kfree(pci);
-}
+   debugf1(%s()\n, __func__);
 
+   

chipsfb: use correct pm state

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26b97237f7eee977eb8beb59adbbf0a8ab4f8276
Commit: 26b97237f7eee977eb8beb59adbbf0a8ab4f8276
Parent: 780dcdb21170ae8ad3faa640ede249261f216a8c
Author: Rafael J. Wysocki [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:12 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

chipsfb: use correct pm state

chipsfb.c shouldn't use PM_SUSPEND_MEM in there, but PM_EVENT_SUSPEND.

Cc: Cedric Le Goater [EMAIL PROTECTED]
Cc: Antonino A. Daplas [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/chipsfb.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
index f48e8c5..6796ba6 100644
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -24,6 +24,7 @@
 #include linux/delay.h
 #include linux/interrupt.h
 #include linux/fb.h
+#include linux/pm.h
 #include linux/init.h
 #include linux/pci.h
 #include linux/console.h
@@ -458,7 +459,7 @@ static int chipsfb_pci_suspend(struct pci_dev *pdev, 
pm_message_t state)
 
if (state.event == pdev-dev.power.power_state.event)
return 0;
-   if (state.event != PM_SUSPEND_MEM)
+   if (state.event != PM_EVENT_SUSPEND)
goto done;
 
acquire_console_sem();
-
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


fix inode_table test in ext234_check_descriptors

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=780dcdb21170ae8ad3faa640ede249261f216a8c
Commit: 780dcdb21170ae8ad3faa640ede249261f216a8c
Parent: 98ac0e53facc851f8bc5110039ab05005c0c4736
Author: Eric Sandeen [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:11 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

fix inode_table test in ext234_check_descriptors

ext[234]_check_descriptors sanity checks block group descriptor geometry at
mount time, testing whether the block bitmap, inode bitmap, and inode table
reside wholly within the blockgroup.  However, the inode table test is off
by one so that if the last block in the inode table resides on the last
block of the block group, the test incorrectly fails.  This is because it
tests the last block as (start + length) rather than (start + length - 1).

This can be seen by trying to mount a filesystem made such as:

 mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024

which yields:

 EXT2-fs error (device loop0): ext2_check_descriptors: Inode table for 
group 0 not in group (block 101)!
 EXT2-fs: group descriptors corrupted!

There is a similar bug in e2fsprogs, patch already sent for that.

(I wonder if inside(), outside(), and/or in_range() should someday be
used in this and other tests throughout the ext filesystems...)

Signed-off-by: Eric Sandeen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/ext2/super.c |2 +-
 fs/ext3/super.c |2 +-
 fs/ext4/super.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 68579a0..639a32c 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -580,7 +580,7 @@ static int ext2_check_descriptors (struct super_block * sb)
return 0;
}
if (le32_to_cpu(gdp-bg_inode_table)  first_block ||
-   le32_to_cpu(gdp-bg_inode_table) + sbi-s_itb_per_group 
+   le32_to_cpu(gdp-bg_inode_table) + sbi-s_itb_per_group - 1 

last_block)
{
ext2_error (sb, ext2_check_descriptors,
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index f0614e3..22cfdd6 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1221,7 +1221,7 @@ static int ext3_check_descriptors (struct super_block * 
sb)
return 0;
}
if (le32_to_cpu(gdp-bg_inode_table)  first_block ||
-   le32_to_cpu(gdp-bg_inode_table) + sbi-s_itb_per_group 
+   le32_to_cpu(gdp-bg_inode_table) + sbi-s_itb_per_group - 1 

last_block)
{
ext3_error (sb, ext3_check_descriptors,
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 75adbb6..4550b83 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1283,7 +1283,7 @@ static int ext4_check_descriptors (struct super_block * 
sb)
}
inode_table = ext4_inode_table(sb, gdp);
if (inode_table  first_block ||
-   inode_table + sbi-s_itb_per_group  last_block)
+   inode_table + sbi-s_itb_per_group - 1  last_block)
{
ext4_error (sb, ext4_check_descriptors,
Inode table for group %d
-
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


xenbus_xs.c: fix a use-after-free

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98ac0e53facc851f8bc5110039ab05005c0c4736
Commit: 98ac0e53facc851f8bc5110039ab05005c0c4736
Parent: 4c6a1c130e00556a5c69101035bce4d9ab7c5c94
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:10 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

xenbus_xs.c: fix a use-after-free

This patch fixes an obvious use-after-free spotted by the Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Jeremy Fitzhardinge [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/xen/xenbus/xenbus_xs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 9e943fb..227d53b 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -782,8 +782,8 @@ static int process_msg(void)
msg-u.watch.vec = split(body, msg-hdr.len,
 msg-u.watch.vec_size);
if (IS_ERR(msg-u.watch.vec)) {
-   kfree(msg);
err = PTR_ERR(msg-u.watch.vec);
+   kfree(msg);
goto out;
}
 
-
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


memory unplug: isolate_lru_page fix

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3dd9fe8c397df68086e6a1b2160573abbe944813
Commit: 3dd9fe8c397df68086e6a1b2160573abbe944813
Parent: dc386d4d1e98bb39fb967ee156cd456c802fc692
Author: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:08 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

memory unplug: isolate_lru_page fix

release_pages() in mm/swap.c changes page_count() to be 0 without removing
PageLRU flag...

This means isolate_lru_page() can see a page, PageLRU() 
page_count(page)==0..  This is BUG.  (get_page() will be called against
count=0 page.)

Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/migrate.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index c8d8722..37c73b9 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -49,9 +49,8 @@ int isolate_lru_page(struct page *page, struct list_head 
*pagelist)
struct zone *zone = page_zone(page);
 
spin_lock_irq(zone-lru_lock);
-   if (PageLRU(page)) {
+   if (PageLRU(page)  get_page_unless_zero(page)) {
ret = 0;
-   get_page(page);
ClearPageLRU(page);
if (PageActive(page))
del_page_from_active_list(zone, page);
-
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


memory unplug: migration by kernel

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dc386d4d1e98bb39fb967ee156cd456c802fc692
Commit: dc386d4d1e98bb39fb967ee156cd456c802fc692
Parent: 098284020c47c1212d211e39ae2b41c21182e056
Author: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:07 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

memory unplug: migration by kernel

In usual, migrate_pages(page,,) is called with holding mm-sem by system 
call.
(mm here is a mm_struct which maps the migration target page.)
This semaphore helps avoiding some race conditions.

But, if we want to migrate a page by some kernel codes, we have to avoid
some races. This patch adds check code for following race condition.

1. A page which page-mapping==NULL can be target of migration. Then, we 
have
   to check page-mapping before calling try_to_unmap().

2. anon_vma can be freed while page is unmapped, but page-mapping remains 
as
   it was. We drop page-mapcount to be 0. Then we cannot trust 
page-mapping.
   So, use rcu_read_lock() to prevent anon_vma pointed by page-mapping from
   being freed during migration.

Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/migrate.c |   21 +++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 34d8ada..c8d8722 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -632,18 +632,35 @@ static int unmap_and_move(new_page_t get_new_page, 
unsigned long private,
goto unlock;
wait_on_page_writeback(page);
}
-
/*
-* Establish migration ptes or remove ptes
+* By try_to_unmap(), page-mapcount goes down to 0 here. In this case,
+* we cannot notice that anon_vma is freed while we migrates a page.
+* This rcu_read_lock() delays freeing anon_vma pointer until the end
+* of migration. File cache pages are no problem because of page_lock()
+*/
+   rcu_read_lock();
+   /*
+* This is a corner case handling.
+* When a new swap-cache is read into, it is linked to LRU
+* and treated as swapcache but has no rmap yet.
+* Calling try_to_unmap() against a page-mapping==NULL page is
+* BUG. So handle it here.
 */
+   if (!page-mapping)
+   goto rcu_unlock;
+   /* Establish migration ptes or remove ptes */
try_to_unmap(page, 1);
+
if (!page_mapped(page))
rc = move_to_new_page(newpage, page);
 
if (rc)
remove_migration_ptes(page, page);
+rcu_unlock:
+   rcu_read_unlock();
 
 unlock:
+
unlock_page(page);
 
if (rc != -EAGAIN) {
-
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_POWERNOW_K8_ACPI must depend on ACPI

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a1cdd4a64f6ce15a1e81759ef99eed3a91f9acbe
Commit: a1cdd4a64f6ce15a1e81759ef99eed3a91f9acbe
Parent: f56a384e98aa81065038c4e16f39ed989ccae687
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:05 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

X86_POWERNOW_K8_ACPI must depend on ACPI

This patch fixes the following compile error introduced by
commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported
by Alexey Dobriyan:

--  snip  --

   CC  arch/i386/kernel/acpi/cstate.o
In file included from arch/i386/kernel/acpi/cstate.c:17:
include/acpi/processor.h:88: error: expected specifier-qualifier-list 
before 'acpi_integer'

--  snip  --

If you select something you must ensure that the dependencies of what
you are selecting are fulfilled.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Cc: Alexey Dobriyan [EMAIL PROTECTED]
Cc: Joshua Hoblitt [EMAIL PROTECTED]
Cc: Dave Jones [EMAIL PROTECTED]
Cc: Michal Piotrowski [EMAIL PROTECTED]
Cc: Len Brown [EMAIL PROTECTED]
Cc: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/i386/kernel/cpu/cpufreq/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig 
b/arch/i386/kernel/cpu/cpufreq/Kconfig
index 094118b..d8c6f13 100644
--- a/arch/i386/kernel/cpu/cpufreq/Kconfig
+++ b/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -92,7 +92,7 @@ config X86_POWERNOW_K8
 config X86_POWERNOW_K8_ACPI
bool ACPI Support
select ACPI_PROCESSOR
-   depends on X86_POWERNOW_K8
+   depends on ACPI  X86_POWERNOW_K8
default y
help
  This provides access to the K8s Processor Performance States via ACPI.
-
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


lguest: documentation VII: FIXMEs

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f56a384e98aa81065038c4e16f39ed989ccae687
Commit: f56a384e98aa81065038c4e16f39ed989ccae687
Parent: f8f0fdcd40449d318f8dc30c1b361b0b7f54134a
Author: Rusty Russell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:05 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

lguest: documentation VII: FIXMEs

Documentation: The FIXMEs

Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/lguest/lguest.c |   12 
 drivers/char/hvc_lguest.c |3 +++
 drivers/lguest/interrupts_and_traps.c |   14 ++
 drivers/lguest/io.c   |   10 ++
 drivers/lguest/lguest.c   |8 
 drivers/lguest/lguest_asm.S   |   14 ++
 drivers/lguest/page_tables.c  |5 +
 drivers/lguest/segments.c |4 
 drivers/net/lguest_net.c  |   19 +++
 9 files changed, 89 insertions(+), 0 deletions(-)

diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index d7e26f0..f791840 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1510,3 +1510,15 @@ int main(int argc, char *argv[])
/* Finally, run the Guest.  This doesn't return. */
run_guest(lguest_fd, device_list);
 }
+/*:*/
+
+/*M:999
+ * Mastery is done: you now know everything I do.
+ *
+ * But surely you have seen code, features and bugs in your wanderings which
+ * you now yearn to attack?  That is the real game, and I look forward to you
+ * patching and forking lguest into the Your-Name-Here-visor.
+ *
+ * Farewell, and good coding!
+ * Rusty Russell.
+ */
diff --git a/drivers/char/hvc_lguest.c b/drivers/char/hvc_lguest.c
index 1de8967..feeccba 100644
--- a/drivers/char/hvc_lguest.c
+++ b/drivers/char/hvc_lguest.c
@@ -13,6 +13,9 @@
  * functions.
  :*/
 
+/*M:002 The console can be flooded: while the Guest is processing input the
+ * Host can send more.  Buffering in the Host could alleviate this, but it is a
+ * difficult problem in general. :*/
 /* Copyright (C) 2006 Rusty Russell, IBM Corporation
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/drivers/lguest/interrupts_and_traps.c 
b/drivers/lguest/interrupts_and_traps.c
index 3d98303..bd0091b 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -231,6 +231,20 @@ static int direct_trap(const struct lguest *lg,
 * go direct, of course 8) */
return idt_type(trap-a, trap-b) == 0xF;
 }
+/*:*/
+
+/*M:005 The Guest has the ability to turn its interrupt gates into trap gates,
+ * if it is careful.  The Host will let trap gates can go directly to the
+ * Guest, but the Guest needs the interrupts atomically disabled for an
+ * interrupt gate.  It can do this by pointing the trap gate at instructions
+ * within noirq_start and noirq_end, where it can safely disable interrupts. */
+
+/*M:006 The Guests do not use the sysenter (fast system call) instruction,
+ * because it's hardcoded to enter privilege level 0 and so can't go direct.
+ * It's about twice as fast as the older int 0x80 system call, so it might
+ * still be worthwhile to handle it in the Switcher and lcall down to the
+ * Guest.  The sysenter semantics are hairy tho: search for that keyword in
+ * entry.S :*/
 
 /*H:260 When we make traps go directly into the Guest, we need to make sure
  * the kernel stack is valid (ie. mapped in the page tables).  Otherwise, the
diff --git a/drivers/lguest/io.c b/drivers/lguest/io.c
index da28812..ea68613 100644
--- a/drivers/lguest/io.c
+++ b/drivers/lguest/io.c
@@ -553,6 +553,16 @@ void release_all_dma(struct lguest *lg)
up_read(lg-mm-mmap_sem);
 }
 
+/*M:007 We only return a single DMA buffer to the Launcher, but it would be
+ * more efficient to return a pointer to the entire array of DMA buffers, which
+ * it can cache and choose one whenever it wants.
+ *
+ * Currently the Launcher uses a write to /dev/lguest, and the return value is
+ * the address of the DMA structure with the interrupt number placed in
+ * dma-used_len.  If we wanted to return the entire array, we need to return
+ * the address, array size and interrupt number: this seems to require an
+ * ioctl(). :*/
+
 /*L:320 This routine looks for a DMA buffer registered by the Guest on the
  * given key (using the BIND_DMA hypercall). */
 unsigned long get_dma_buffer(struct lguest *lg,
diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c
index 7e7e9fb..6dfe568 100644
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -250,6 +250,14 @@ static void irq_enable(void)
 {
lguest_data.irq_enabled = X86_EFLAGS_IF;
 }
+/*:*/
+/*M:003 Note that we don't 

rtc-ds1307: typo fix found by coverity

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd16f9ebd083b965dcdfb6b762e206374d5b823b
Commit: bd16f9ebd083b965dcdfb6b762e206374d5b823b
Parent: 47572b84aa3d4c9d44bceb43af8c58744b96af10
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:00 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:16 2007 -0700

rtc-ds1307: typo fix found by coverity

Fix a typo turned up by a Coverity check:  referring to the wrong register,
which could cause problems with DS1338 RTCs whose oscillators halted.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/rtc/rtc-ds1307.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 5158a62..db6f3f0 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -352,7 +352,7 @@ read_rtc:
/* oscillator fault?  clear flag, and warn */
if (ds1307-regs[DS1307_REG_CONTROL]  DS1338_BIT_OSF) {
i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL,
-   ds1307-regs[DS1337_REG_CONTROL]
+   ds1307-regs[DS1307_REG_CONTROL]
 ~DS1338_BIT_OSF);
dev_warn(client-dev, SET TIME!\n);
goto read_rtc;
-
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


fixup s3c24xx build after arch moves

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47572b84aa3d4c9d44bceb43af8c58744b96af10
Commit: 47572b84aa3d4c9d44bceb43af8c58744b96af10
Parent: 70f38db60cc5c8c6c3a95f0d2e6360272d6014a3
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:40:59 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:16 2007 -0700

fixup s3c24xx build after arch moves

Fix the include files moved around during the s3c24xx arch moves.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/spi/spi_s3c24xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 7071ff8..5cf4812 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -28,7 +28,7 @@
 #include asm/hardware.h
 
 #include asm/arch/regs-gpio.h
-#include asm/arch/regs-spi.h
+#include asm/plat-s3c24xx/regs-spi.h
 #include asm/arch/spi.h
 
 struct s3c24xx_spi {
-
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


Slab maintainer Credits update

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=415ad26d8c8665a0fcfc18552daf411a9bc1a41e
Commit: 415ad26d8c8665a0fcfc18552daf411a9bc1a41e
Parent: 61df47c8da1b4ba0f243975f11efc8956de0cba6
Author: Christoph Lameter [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:40:56 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:33:46 2007 -0700

Slab maintainer  Credits update

Signed-off-by: Christoph Lameter [EMAIL PROTECTED]
Acked-by: Pekka Enberg [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 CREDITS |5 +++--
 MAINTAINERS |8 
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/CREDITS b/CREDITS
index 10c214d..832436e 100644
--- a/CREDITS
+++ b/CREDITS
@@ -966,6 +966,7 @@ N: Pekka Enberg
 E: [EMAIL PROTECTED]
 W: http://www.cs.helsinki.fi/u/penberg/
 D: Various kernel hacks, fixes, and cleanups.
+D: Slab allocators
 S: Finland
 
 N: David Engebretsen
@@ -1939,8 +1940,8 @@ D: for Menuconfig's lxdialog.
 N: Christoph Lameter
 E: [EMAIL PROTECTED]
 D: Digiboard PC/Xe and PC/Xi, Digiboard EPCA
-D: Early protocol filter for bridging code
-D: Bug fixes
+D: NUMA support, Slab allocators, Page migration
+D: Scalability, Time subsystem
 
 N: Paul Laufer
 E: [EMAIL PROTECTED]
diff --git a/MAINTAINERS b/MAINTAINERS
index 01f222e..babd00b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3339,6 +3339,14 @@ M:   [EMAIL PROTECTED]
 W: http://www.winischhofer.at/linuxsisusbvga.shtml
 S: Maintained
 
+SLAB ALLOCATOR
+P: Christoph Lameter
+M: [EMAIL PROTECTED]
+P: Pekka Enberg
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+S: Maintained
+
 SMC91x ETHERNET DRIVER
 P: Nicolas Pitre
 M: [EMAIL PROTECTED]
-
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


kernel-doc fix for kmod.c

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=61df47c8da1b4ba0f243975f11efc8956de0cba6
Commit: 61df47c8da1b4ba0f243975f11efc8956de0cba6
Parent: f50cadaa8ffa72ad430e5beabe02eb752f3f72a3
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:40:56 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:33:06 2007 -0700

kernel-doc fix for kmod.c

Fix kmod.c:
Warning(linux-2.6.23-rc1//kernel/kmod.c:364): No description found for 
parameter 'envp'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/kmod.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/kmod.c b/kernel/kmod.c
index beedbdc..9809cc1 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -351,11 +351,11 @@ static inline void register_pm_notifier_callback(void) {}
 
 /**
  * call_usermodehelper_setup - prepare to call a usermode helper
- * @path - path to usermode executable
- * @argv - arg vector for process
- * @envp - environment for process
+ * @path: path to usermode executable
+ * @argv: arg vector for process
+ * @envp: environment for process
  *
- * Returns either NULL on allocation failure, or a subprocess_info
+ * Returns either %NULL on allocation failure, or a subprocess_info
  * structure.  This should be passed to call_usermodehelper_exec to
  * exec the process and free the structure.
  */
-
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


make __chk_{user,io}_ptr() accept pointers to volatile

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c47ffe3d3d841986108a8316f6e01792cb45d0d2
Commit: c47ffe3d3d841986108a8316f6e01792cb45d0d2
Parent: 1f41bb3a5a24c82900b33071edcedec679b99de7
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:29 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

make __chk_{user,io}_ptr() accept pointers to volatile

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/compiler.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 12a1291..86f9a3a 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -15,8 +15,8 @@
 # define __acquire(x)  __context__(x,1)
 # define __release(x)  __context__(x,-1)
 # define __cond_lock(x,c)  ((c) ? ({ __acquire(x); 1; }) : 0)
-extern void __chk_user_ptr(const void __user *);
-extern void __chk_io_ptr(const void __iomem *);
+extern void __chk_user_ptr(const volatile void __user *);
+extern void __chk_io_ptr(const volatile void __iomem *);
 #else
 # define __user
 # define __kernel
-
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


deal with alpha section warnings

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed5f6561436a1a0b38f4130bdb1fed00f14e60b5
Commit: ed5f6561436a1a0b38f4130bdb1fed00f14e60b5
Parent: 55fe977187405edaaa9b2519b561e97ff1d2
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:34:19 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

deal with alpha section warnings

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/alpha/kernel/head.S|1 +
 arch/alpha/kernel/pci.c |   10 +-
 arch/alpha/kernel/pci_iommu.c   |4 ++--
 arch/alpha/kernel/smp.c |6 +++---
 arch/alpha/kernel/vmlinux.lds.S |1 +
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index e27d23c..7ac1f13 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -10,6 +10,7 @@
 #include asm/system.h
 #include asm/asm-offsets.h
 
+.section .text.head, ax
 .globl swapper_pg_dir
 .globl _stext
 swapper_pg_dir=SWAPPER_PGD
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ab642a4..9dc1cee 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -195,7 +195,7 @@ pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-char * __init
+char * __devinit
 pcibios_setup(char *str)
 {
return str;
@@ -204,7 +204,7 @@ pcibios_setup(char *str)
 #ifdef ALPHA_RESTORE_SRM_SETUP
 static struct pdev_srm_saved_conf *srm_saved_configs;
 
-void __init
+void __devinit
 pdev_save_srm_config(struct pci_dev *dev)
 {
struct pdev_srm_saved_conf *tmp;
@@ -247,14 +247,14 @@ pci_restore_srm_config(void)
 }
 #endif
 
-void __init
+void __devinit
 pcibios_fixup_resource(struct resource *res, struct resource *root)
 {
res-start += root-start;
res-end += root-start;
 }
 
-void __init
+void __devinit
 pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
 {
/* Update device resources.  */
@@ -273,7 +273,7 @@ pcibios_fixup_device_resources(struct pci_dev *dev, struct 
pci_bus *bus)
}
 }
 
-void __init
+void __devinit
 pcibios_fixup_bus(struct pci_bus *bus)
 {
/* Propagate hose info into the subordinate devices.  */
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 6b07f89..e1c4707 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -58,7 +58,7 @@ size_for_memory(unsigned long max)
return max;
 }
 
-struct pci_iommu_arena *
+struct pci_iommu_arena * __init
 iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base,
 unsigned long window_size, unsigned long align)
 {
@@ -117,7 +117,7 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, 
dma_addr_t base,
return arena;
 }
 
-struct pci_iommu_arena *
+struct pci_iommu_arena * __init
 iommu_arena_new(struct pci_controller *hose, dma_addr_t base,
unsigned long window_size, unsigned long align)
 {
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index b287314..0804b6a 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -358,7 +358,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
 /*
  * Bring one cpu online.
  */
-static int __devinit
+static int __cpuinit
 smp_boot_one_cpu(int cpuid)
 {
struct task_struct *idle;
@@ -487,7 +487,7 @@ smp_prepare_boot_cpu(void)
 {
 }
 
-int __devinit
+int __cpuinit
 __cpu_up(unsigned int cpu)
 {
smp_boot_one_cpu(cpu);
@@ -541,7 +541,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs)
set_irq_regs(old_regs);
 }
 
-int __init
+int
 setup_profiling_timer(unsigned int multiplier)
 {
return -EINVAL;
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index fe13daa..7af07d3 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -15,6 +15,7 @@ SECTIONS
 
   _text = .;   /* Text and read-only data */
   .text : { 
+   *(.text.head)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
-
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


viohs: extern on function definition

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55fe977187405edaaa9b2519b561e97ff1d2
Commit: 55fe977187405edaaa9b2519b561e97ff1d2
Parent: b0a5ab93158586e599ecd0d24a9a72da74d23ddd
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:34:09 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

viohs: extern on function definition

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/sparc64/kernel/viohs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sparc64/kernel/viohs.c b/arch/sparc64/kernel/viohs.c
index 09126fc..708fa17 100644
--- a/arch/sparc64/kernel/viohs.c
+++ b/arch/sparc64/kernel/viohs.c
@@ -702,7 +702,7 @@ u32 vio_send_sid(struct vio_driver_state *vio)
 }
 EXPORT_SYMBOL(vio_send_sid);
 
-extern int vio_ldc_alloc(struct vio_driver_state *vio,
+int vio_ldc_alloc(struct vio_driver_state *vio,
 struct ldc_channel_config *base_cfg,
 void *event_arg)
 {
-
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


lockd and nfsd endianness annotation fixes

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca5c8cde93d65db3139604ca6b91bf8ff3f775e2
Commit: ca5c8cde93d65db3139604ca6b91bf8ff3f775e2
Parent: 582ee43dad8e411513a74f2d801255dcffc6d29e
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:49 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

lockd and nfsd endianness annotation fixes

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/lockd/svclock.c |6 +++---
 fs/nfsd/nfs4xdr.c  |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index b3efa45..a21e4bc 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -335,10 +335,10 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call)
 /*
  * Deferred lock request handling for non-blocking lock
  */
-static u32
+static __be32
 nlmsvc_defer_lock_rqst(struct svc_rqst *rqstp, struct nlm_block *block)
 {
-   u32 status = nlm_lck_denied_nolocks;
+   __be32 status = nlm_lck_denied_nolocks;
 
block-b_flags |= B_QUEUED;
 
@@ -352,7 +352,7 @@ nlmsvc_defer_lock_rqst(struct svc_rqst *rqstp, struct 
nlm_block *block)
status = nlm_drop_reply;
}
dprintk(lockd: nlmsvc_defer_lock_rqst block %p flags %d status %d\n,
-   block, block-b_flags, status);
+   block, block-b_flags, ntohl(status));
 
return status;
 }
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index b3d55c6..8ef0964 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2450,7 +2450,7 @@ nfsd4_encode_rename(struct nfsd4_compoundres *resp, 
__be32 nfserr, struct nfsd4_
 }
 
 static void
-nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, int nfserr,
+nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
 struct nfsd4_secinfo *secinfo)
 {
int i = 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


mmc: add a might_sleep() to mmc_claim_host()

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf795bfb3ad4e2f8f6bb346aa8edb8272d4c70a2
Commit: cf795bfb3ad4e2f8f6bb346aa8edb8272d4c70a2
Parent: 67a61c484735de9bf4f099830ecb4ef2eca95c38
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Wed Jul 11 20:28:02 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 01:53:48 2007 +0200

mmc: add a might_sleep() to mmc_claim_host()

In the normal case, the host lock can be claimed directly.
When it cannot, the caller will sleep. Make sure we don't
have any latent bugs by always calling might_sleep().

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/core/core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e08aa35..3208890 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -260,6 +260,8 @@ void mmc_claim_host(struct mmc_host *host)
DECLARE_WAITQUEUE(wait, current);
unsigned long flags;
 
+   might_sleep();
+
add_wait_queue(host-wq, wait);
spin_lock_irqsave(host-lock, flags);
while (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


[POWERPC] Add function to check if address is an IO port

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6dfbde209171cd15407e7540d363a434a489aaca
Commit: 6dfbde209171cd15407e7540d363a434a489aaca
Parent: f5d834fc34e61f1a40435981062000e5d2b2baa8
Author: Benjamin Herrenschmidt [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 14:07:13 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:47 2007 +1000

[POWERPC] Add function to check if address is an IO port

This adds a function that tells you if a given kernel virtual address
is hitting a PCI or ISA IO port permanent mapping or not. This is to
be used in the next patch to fix iomap APIs to properly unmap things.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/pci-common.c |   23 +++
 include/asm-powerpc/pci-bridge.h |   20 
 2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index fe7d125..74a8fd4 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_controller *phb)
kfree(phb);
 }
 
+int pcibios_vaddr_is_ioport(void __iomem *address)
+{
+   int ret = 0;
+   struct pci_controller *hose;
+   unsigned long size;
+
+   spin_lock(hose_spinlock);
+   list_for_each_entry(hose, hose_list, list_node) {
+#ifdef CONFIG_PPC64
+   size = hose-pci_io_size;
+#else
+   size = hose-io_resource.end - hose-io_resource.start + 1;
+#endif
+   if (address = hose-io_base_virt 
+   address  (hose-io_base_virt + size)) {
+   ret = 1;
+   break;
+   }
+   }
+   spin_unlock(hose_spinlock);
+   return ret;
+}
+
 /*
  * Return the domain number for this bus.
  */
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index d53e0eb..e909769 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -71,6 +71,14 @@ static inline struct pci_controller *pci_bus_to_host(struct 
pci_bus *bus)
return bus-sysdata;
 }
 
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+   /* No specific ISA handling on ppc32 at this stage, it
+* all goes through PCI
+*/
+   return 0;
+}
+
 /* These are used for config access before all the PCI probing
has been done. */
 int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn,
@@ -241,6 +249,13 @@ extern void pcibios_free_controller(struct pci_controller 
*phb);
 
 extern void isa_bridge_find_early(struct pci_controller *hose);
 
+static inline int isa_vaddr_is_ioport(void __iomem *address)
+{
+   /* Check if address hits the reserved legacy IO range */
+   unsigned long ea = (unsigned long)address;
+   return ea = ISA_IO_BASE  ea  ISA_IO_END;
+}
+
 extern int pcibios_unmap_io_space(struct pci_bus *bus);
 extern int pcibios_map_io_space(struct pci_bus *bus);
 
@@ -271,11 +286,16 @@ extern struct pci_controller *
 pcibios_alloc_controller(struct device_node *dev);
 #ifdef CONFIG_PCI
 extern unsigned long pci_address_to_pio(phys_addr_t address);
+extern int pcibios_vaddr_is_ioport(void __iomem *address);
 #else
 static inline unsigned long pci_address_to_pio(phys_addr_t address)
 {
return (unsigned long)-1;
 }
+static inline int pcibios_vaddr_is_ioport(void __iomem *address)
+{
+   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


sdhci: add support to ENE-CB714

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8352260d28b30cb2bb2df99814fb9c360e38901
Commit: b8352260d28b30cb2bb2df99814fb9c360e38901
Parent: 43b58b36b7e6554b8a96be6b9f63542c583c06e5
Author: Leandro Dorileo [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 23:47:04 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 01:53:09 2007 +0200

sdhci: add support to ENE-CB714

Added its pci_id and implemented a quirk for it because this
controller needs to reset cmd and data when setting ios.

Signed-off-by: Leandro Dorileo [EMAIL PROTECTED]
Signed-off-by: Otavio Salvador [EMAIL PROTECTED]
Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/host/sdhci.c |   27 +++
 include/linux/pci_ids.h  |2 ++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 56de4c4..dd4bfb5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -34,6 +34,7 @@ static unsigned int debug_quirks = 0;
 /* Controller doesn't like some resets when there is no card inserted. */
 #define SDHCI_QUIRK_NO_CARD_NO_RESET   (12)
 #define SDHCI_QUIRK_SINGLE_POWER_WRITE (13)
+#define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS  (14)
 
 static const struct pci_device_id pci_ids[] __devinitdata = {
{
@@ -78,6 +79,24 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
.driver_data= SDHCI_QUIRK_SINGLE_POWER_WRITE,
},
 
+   {
+   .vendor = PCI_VENDOR_ID_ENE,
+   .device = PCI_DEVICE_ID_ENE_CB714_SD,
+   .subvendor  = PCI_ANY_ID,
+   .subdevice  = PCI_ANY_ID,
+   .driver_data= SDHCI_QUIRK_SINGLE_POWER_WRITE |
+ SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS,
+   },
+
+   {
+   .vendor = PCI_VENDOR_ID_ENE,
+   .device = PCI_DEVICE_ID_ENE_CB714_SD_2,
+   .subvendor  = PCI_ANY_ID,
+   .subdevice  = PCI_ANY_ID,
+   .driver_data= SDHCI_QUIRK_SINGLE_POWER_WRITE |
+ SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS,
+   },
+
{   /* Generic SD host controller */
PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI  8), 0x00)
},
@@ -759,6 +778,14 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct 
mmc_ios *ios)
 
writeb(ctrl, host-ioaddr + SDHCI_HOST_CONTROL);
 
+   /*
+* Some (ENE) controllers go apeshit on some ios operation,
+* signalling timeout and CRC errors even on CMD0. Resetting
+* it on each ios seems to solve the problem.
+*/
+   if(host-chip-quirks  SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS)
+   sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
+
mmiowb();
spin_unlock_irqrestore(host-lock, flags);
 }
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index cbabb9c..0befd95 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1972,6 +1972,8 @@
 #define PCI_VENDOR_ID_ENE  0x1524
 #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550
 #define PCI_DEVICE_ID_ENE_CB712_SD_2   0x0551
+#define PCI_DEVICE_ID_ENE_CB714_SD 0x0750
+#define PCI_DEVICE_ID_ENE_CB714_SD_2   0x0751
 #define PCI_DEVICE_ID_ENE_1211 0x1211
 #define PCI_DEVICE_ID_ENE_1225 0x1225
 #define PCI_DEVICE_ID_ENE_1410 0x1410
-
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


[PATCH] sched: mark sysrq_sched_debug_show() static

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f33734619371ae40f34bbce001938408e6634f05
Commit: f33734619371ae40f34bbce001938408e6634f05
Parent: 2cd4d0ea19713304963dbb2de5073700bfe253f5
Author: Josh Triplett [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: mark sysrq_sched_debug_show() static

Only sched.c uses sysrq_sched_debug_show, and sched.c includes 
sched_debug.c,
so all uses of sysrq_sched_debug_show occur in the same source file.

Eliminates a sparse warning:
warning: symbol 'sysrq_sched_debug_show' was not declared. Should it be 
static?

Signed-off-by: Josh Triplett [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 kernel/sched_debug.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 29f2c21..42970f7 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -186,7 +186,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
return 0;
 }
 
-void sysrq_sched_debug_show(void)
+static void sysrq_sched_debug_show(void)
 {
sched_debug_show(NULL, NULL);
 }
-
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


mmc: check error bits before command completion

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43b58b36b7e6554b8a96be6b9f63542c583c06e5
Commit: 43b58b36b7e6554b8a96be6b9f63542c583c06e5
Parent: b8c1c5da1520977cb55a358f20fc09567d40cad9
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 23:15:27 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 01:53:01 2007 +0200

mmc: check error bits before command completion

Some controllers signal command complete even on failures (which
they are allowed to do according to the spec). Make sure we check
the error bits first so we don't get any false positives.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/host/sdhci.c |   23 ++-
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4a24db0..56de4c4 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -922,20 +922,17 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 
intmask)
return;
}
 
-   if (intmask  SDHCI_INT_RESPONSE)
-   sdhci_finish_command(host);
-   else {
-   if (intmask  SDHCI_INT_TIMEOUT)
-   host-cmd-error = MMC_ERR_TIMEOUT;
-   else if (intmask  SDHCI_INT_CRC)
-   host-cmd-error = MMC_ERR_BADCRC;
-   else if (intmask  (SDHCI_INT_END_BIT | SDHCI_INT_INDEX))
-   host-cmd-error = MMC_ERR_FAILED;
-   else
-   host-cmd-error = MMC_ERR_INVALID;
-
+   if (intmask  SDHCI_INT_TIMEOUT)
+   host-cmd-error = MMC_ERR_TIMEOUT;
+   else if (intmask  SDHCI_INT_CRC)
+   host-cmd-error = MMC_ERR_BADCRC;
+   else if (intmask  (SDHCI_INT_END_BIT | SDHCI_INT_INDEX))
+   host-cmd-error = MMC_ERR_FAILED;
+
+   if (host-cmd-error != MMC_ERR_NONE)
tasklet_schedule(host-finish_tasklet);
-   }
+   else if (intmask  SDHCI_INT_RESPONSE)
+   sdhci_finish_command(host);
 }
 
 static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
-
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


[POWERPC] Fix loop with unsigned long counter variable

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56d6d1a73d9e5ddd9eb1a7baeeda30803ba44879
Commit: 56d6d1a73d9e5ddd9eb1a7baeeda30803ba44879
Parent: 77926826f301fbd8ed96d3cd9ff17a5b59560dfb
Author: Manish Ahuja [EMAIL PROTECTED]
AuthorDate: Tue Jul 10 05:03:45 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:12:17 2007 +1000

[POWERPC] Fix loop with unsigned long counter variable

This fixes a possible infinite loop when the unsigned long counter i
is used in lmb_add_region() in the following for loop:

for (i = rgn-cnt-1; i = 0; i--)

by making the loop counter i be signed.

Signed-off-by: Manish Ahuja [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/mm/lmb.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index e3a1e8d..8f4d2dc 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -138,8 +138,8 @@ void __init lmb_analyze(void)
 static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
  unsigned long size)
 {
-   unsigned long i, coalesced = 0;
-   long adjacent;
+   unsigned long coalesced = 0;
+   long adjacent, i;
 
/* First try and coalesce this LMB with another. */
for (i=0; i  rgn-cnt; 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


more VIRT_TO_BUS dependencies

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=52cf875fb0f3a8a472eaa8be479777cf0a92e3ce
Commit: 52cf875fb0f3a8a472eaa8be479777cf0a92e3ce
Parent: c98dbe59ae4da701f81ba16eb02c94ed85e663c7
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:32:59 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

more VIRT_TO_BUS dependencies

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/media/video/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 9dcbffd..e204e7b 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -509,7 +509,7 @@ config VIDEO_VINO
 
 config VIDEO_STRADIS
tristate Stradis 4:2:2 MPEG-2 video driver  (EXPERIMENTAL)
-   depends on EXPERIMENTAL  PCI  VIDEO_V4L1  !PPC64
+   depends on EXPERIMENTAL  PCI  VIDEO_V4L1  VIRT_TO_BUS
help
  Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video
  driver for PCI.  There is a product page at
@@ -520,7 +520,7 @@ config VIDEO_ZORAN_ZR36060
 
 config VIDEO_ZORAN
tristate Zoran ZR36057/36067 Video For Linux
-   depends on PCI  I2C_ALGOBIT  VIDEO_V4L1  !PPC64
+   depends on PCI  I2C_ALGOBIT  VIDEO_V4L1  VIRT_TO_BUS
help
  Say Y for support for MJPEG capture cards based on the Zoran
  36057/36067 PCI controller chipset. This includes the Iomega
-
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


fix missing arguments in drivers/rtc/rtc-stk17ta8.c

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c98dbe59ae4da701f81ba16eb02c94ed85e663c7
Commit: c98dbe59ae4da701f81ba16eb02c94ed85e663c7
Parent: be03e56b777362a70f29399aaff9989fc3f3de63
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:32:49 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

fix missing arguments in drivers/rtc/rtc-stk17ta8.c

struct bin_attribute * is needed in bin_attribute -read()/-write()
now.  Incidentally, could people please run the fscking compiler
before and after applying their patch and compare the build logs?
That (and many, many other) would be caught immediately.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/rtc/rtc-stk17ta8.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index f10d3fa..8288b6b 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -258,7 +258,8 @@ static const struct rtc_class_ops stk17ta8_rtc_ops = {
.ioctl  = stk17ta8_rtc_ioctl,
 };
 
-static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf,
+static ssize_t stk17ta8_nvram_read(struct kobject *kobj,
+struct bin_attribute *attr, char *buf,
 loff_t pos, size_t size)
 {
struct platform_device *pdev =
@@ -272,7 +273,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj, 
char *buf,
return count;
 }
 
-static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf,
+static ssize_t stk17ta8_nvram_write(struct kobject *kobj,
+ struct bin_attribute *attr, char *buf,
  loff_t pos, size_t size)
 {
struct platform_device *pdev =
-
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 prototype for ack_bad_irq

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c423941890daebe2205a11bca7b51907f2b13940
Commit: c423941890daebe2205a11bca7b51907f2b13940
Parent: e4903fb59590f86190280a549420f6cb85bd7f7e
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: add prototype for ack_bad_irq

Create prototype for ack_bad_irq() for m68knommu.
Compilation of kernel/irq/handle.c fails without it.

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

diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h
index 980075b..bfad281 100644
--- a/include/asm-m68knommu/hardirq.h
+++ b/include/asm-m68knommu/hardirq.h
@@ -22,4 +22,6 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #endif
 
+void ack_bad_irq(unsigned int irq);
+
 #endif /* __M68K_HARDIRQ_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_64: cleanup tsc.c merge artifact

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8ec3cf7d29aef773eee5bc6cd9b0fa4d3fb42480
Commit: 8ec3cf7d29aef773eee5bc6cd9b0fa4d3fb42480
Parent: 4fc09385c79fa95e97365d33de9b4e046d680b94
Author: Thomas Gleixner [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:19 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:20 2007 -0700

x86_64: cleanup tsc.c merge artifact

tsc_unstable is declared twice.

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86_64/kernel/tsc.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
index 9b76b03..2a59bde 100644
--- a/arch/x86_64/kernel/tsc.c
+++ b/arch/x86_64/kernel/tsc.c
@@ -118,8 +118,6 @@ core_initcall(cpufreq_tsc);
 
 #endif
 
-static int tsc_unstable = 0;
-
 /*
  * Make an educated guess if the TSC is trustworthy and synchronized
  * over all CPUs.
-
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


fix 'dynreloc miscount' link error on Powerpc

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=045e72acf16054c4ed2760e9a8edb19a08053af1
Commit: 045e72acf16054c4ed2760e9a8edb19a08053af1
Parent: 2ebc3cc920e7a076539aa8badbaf0919540a3438
Author: Sam Ravnborg [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:13 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

fix 'dynreloc miscount' link error on Powerpc

Nathan Lynch [EMAIL PROTECTED] reported:
2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
maple_defconfig):

  LD  vmlinux.o
powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
kernel/built-in.o, section .opd
powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
make: *** [vmlinux.o] Error 1

However, I see a possibly related binutils patch:
http://article.gmane.org/gmane.comp.gnu.binutils/33650

It was tracked down to be caused by the weak prototype
declaration in mm.h:
__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);

But there is no need to make the declaration weak - only the definition
needs to be marked weak.  So drop the weak declaration.  And in the process
drop the duplicate definition in page.h for powerpc.

Note: the arch_vma_name fix for x86_64 needs to be applied first to avoid
breaking x86_64

Signed-off-by: Sam Ravnborg [EMAIL PROTECTED]
Cc: Nathan Lynch [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-powerpc/page.h |1 -
 include/linux/mm.h |2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
index 10c51f4..236a921 100644
--- a/include/asm-powerpc/page.h
+++ b/include/asm-powerpc/page.h
@@ -190,7 +190,6 @@ extern void copy_user_page(void *to, void *from, unsigned 
long vaddr,
 extern int page_is_ram(unsigned long pfn);
 
 struct vm_area_struct;
-extern const char *arch_vma_name(struct vm_area_struct *vma);
 
 #include asm-generic/memory_model.h
 #endif /* __ASSEMBLY__ */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c456c3a..3e9e8fe 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1246,7 +1246,7 @@ void drop_slab(void);
 extern int randomize_va_space;
 #endif
 
-__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
+const char * arch_vma_name(struct vm_area_struct *vma);
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_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


edac is bust on mips

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c6a1c130e00556a5c69101035bce4d9ab7c5c94
Commit: 4c6a1c130e00556a5c69101035bce4d9ab7c5c94
Parent: f52e0ef47b22c18ff56f6233f814b329cb6e32cc
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:10 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

edac is bust on mips

drivers/edac/edac_stub.c:15:22: asm/edac.h: No such file or directory

was it even supposed to work?

Cc: Douglas Thompson [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/edac/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 1724c41..43dd5a3 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -8,7 +8,7 @@ menuconfig EDAC
bool EDAC - error detection and reporting (EXPERIMENTAL)
depends on HAS_IOMEM
depends on EXPERIMENTAL
-   depends on X86 || MIPS || PPC
+   depends on X86 || PPC
help
  EDAC is designed to report errors in the core system.
  These are low-level errors that are reported in the CPU or
-
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


i2c: ds1682 warning fix

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f52e0ef47b22c18ff56f6233f814b329cb6e32cc
Commit: f52e0ef47b22c18ff56f6233f814b329cb6e32cc
Parent: 0ca56b4bb24e01158cb5d87adafa4b76da1f044d
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:09 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

i2c: ds1682 warning fix

ia64:

drivers/i2c/chips/ds1682.c: In function `ds1682_show':
drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long 
unsigned int arg (arg 3)
drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long 
unsigned int arg (arg 3)

Cc: Jean Delvare [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/i2c/chips/ds1682.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/chips/ds1682.c b/drivers/i2c/chips/ds1682.c
index 5879f0f..9e94542 100644
--- a/drivers/i2c/chips/ds1682.c
+++ b/drivers/i2c/chips/ds1682.c
@@ -75,7 +75,8 @@ static ssize_t ds1682_show(struct device *dev, struct 
device_attribute *attr,
/* Special case: the 32 bit regs are time values with 1/4s
 * resolution, scale them up to milliseconds */
if (sattr-nr == 4)
-   return sprintf(buf, %llu\n, ((u64) le32_to_cpu(val)) * 250);
+   return sprintf(buf, %llu\n,
+   ((unsigned long long)le32_to_cpu(val)) * 250);
 
/* Format the output string and return # of bytes */
return sprintf(buf, %li\n, (long)le32_to_cpu(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


lguest: documentation III: Drivers

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e2c9784325490c878b7f69aeec1bed98b288bd97
Commit: e2c9784325490c878b7f69aeec1bed98b288bd97
Parent: b2b47c214f4e85ce3968120d42e8b18eccb4f4e3
Author: Rusty Russell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:03 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

lguest: documentation III: Drivers

Documentation: The Drivers

Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/block/lguest_blk.c  |  169 --
 drivers/char/hvc_lguest.c   |   77 +-
 drivers/lguest/lguest_bus.c |   72 -
 drivers/net/lguest_net.c|  218 ---
 include/linux/lguest_bus.h  |5 +-
 include/linux/lguest_launcher.h |   60 ++-
 6 files changed, 562 insertions(+), 39 deletions(-)

diff --git a/drivers/block/lguest_blk.c b/drivers/block/lguest_blk.c
index 5b79d07..93e3c40 100644
--- a/drivers/block/lguest_blk.c
+++ b/drivers/block/lguest_blk.c
@@ -1,6 +1,12 @@
-/* A simple block driver for lguest.
+/*D:400
+ * The Guest block driver
  *
- * Copyright 2006 Rusty Russell [EMAIL PROTECTED] IBM Corporation
+ * This is a simple block driver, which appears as /dev/lgba, lgbb, lgbc etc.
+ * The mechanism is simple: we place the information about the request in the
+ * device page, then use SEND_DMA (containing the data for a write, or an empty
+ * ping DMA for a read).
+ :*/
+/* Copyright 2006 Rusty Russell [EMAIL PROTECTED] IBM Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,27 +31,50 @@
 
 static char next_block_index = 'a';
 
+/*D:420 Here is the structure which holds all the information we need about
+ * each Guest block device.
+ *
+ * I'm sure at this stage, you're wondering hey, where was the adventure I was
+ * promised? and thinking Rusty sucks, I shall say nasty things about him on
+ * my blog.  I think Real adventures have boring bits, too, and you're in the
+ * middle of one.  But it gets better.  Just not quite yet. */
 struct blockdev
 {
+   /* The block queue infrastructure wants a spinlock: it is held while it
+* calls our block request function.  We grab it in our interrupt
+* handler so the responses don't mess with new requests. */
spinlock_t lock;
 
-   /* The disk structure for the kernel. */
+   /* The disk structure registered with kernel. */
struct gendisk *disk;
 
-   /* The major number for this disk. */
+   /* The major device number for this disk, and the interrupt.  We only
+* really keep them here for completeness; we'd need them if we
+* supported device unplugging. */
int major;
int irq;
 
+   /* The physical address of this device's memory page */
unsigned long phys_addr;
-   /* The mapped block page. */
+   /* The mapped memory page for convenient acces. */
struct lguest_block_page *lb_page;
 
-   /* We only have a single request outstanding at a time. */
+   /* We only have a single request outstanding at a time: this is it. */
struct lguest_dma dma;
struct request *req;
 };
 
-/* Jens gave me this nice helper to end all chunks of a request. */
+/*D:495 We originally used end_request() throughout the driver, but it turns
+ * out that end_request() is deprecated, and doesn't actually end the request
+ * (which seems like a good reason to deprecate it!).  It simply ends the first
+ * bio.  So if we had 3 bios in a struct request we would do all 3,
+ * end_request(), do 2, end_request(), do 1 and end_request(): twice as much
+ * work as we needed to do.
+ *
+ * This reinforced to me that I do not understand the block layer.
+ *
+ * Nonetheless, Jens Axboe gave me this nice helper to end all chunks of a
+ * request.  This improved disk speed by 130%. */
 static void end_entire_request(struct request *req, int uptodate)
 {
if (end_that_request_first(req, uptodate, req-hard_nr_sectors))
@@ -55,30 +84,62 @@ static void end_entire_request(struct request *req, int 
uptodate)
end_that_request_last(req, uptodate);
 }
 
+/* I'm told there are only two stories in the world worth telling: love and
+ * hate.  So there used to be a love scene here like this:
+ *
+ *  Launcher:  We could make beautiful I/O together, you and I.
+ *  Guest: My, that's a big disk!
+ *
+ * Unfortunately, it was just too raunchy for our otherwise-gentle tale. */
+
+/*D:490 This is the interrupt handler, called when a block read or write has
+ * been completed for us. */
 static irqreturn_t lgb_irq(int irq, void *_bd)
 {
+   /* We handed our struct blockdev as the argument to 

lguest: documentation II: Guest

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b2b47c214f4e85ce3968120d42e8b18eccb4f4e3
Commit: b2b47c214f4e85ce3968120d42e8b18eccb4f4e3
Parent: f938d2c892db0d80d144253d4a7b7083efdbedeb
Author: Rusty Russell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:02 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

lguest: documentation II: Guest

Documentation: The Guest

Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/lguest/lguest.c |  450 +--
 drivers/lguest/lguest_asm.S |   57 --
 include/linux/lguest.h  |   47 -
 3 files changed, 508 insertions(+), 46 deletions(-)

diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c
index e7d1283..7e7e9fb 100644
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -66,6 +66,12 @@
 #include asm/mce.h
 #include asm/io.h
 
+/*G:010 Welcome to the Guest!
+ *
+ * The Guest in our tale is a simple creature: identical to the Host but
+ * behaving in simplified but equivalent ways.  In particular, the Guest is the
+ * same kernel as the Host (or at least, built from the same source code). :*/
+
 /* Declarations for definitions in lguest_guest.S */
 extern char lguest_noirq_start[], lguest_noirq_end[];
 extern const char lgstart_cli[], lgend_cli[];
@@ -84,7 +90,26 @@ struct lguest_data lguest_data = {
 struct lguest_device_desc *lguest_devices;
 static cycle_t clock_base;
 
-static enum paravirt_lazy_mode lazy_mode;
+/*G:035 Notice the lazy_hcall() above, rather than hcall().  This is our first
+ * real optimization trick!
+ *
+ * When lazy_mode is set, it means we're allowed to defer all hypercalls and do
+ * them as a batch when lazy_mode is eventually turned off.  Because hypercalls
+ * are reasonably expensive, batching them up makes sense.  For example, a
+ * large mmap might update dozens of page table entries: that code calls
+ * lguest_lazy_mode(PARAVIRT_LAZY_MMU), does the dozen updates, then calls
+ * lguest_lazy_mode(PARAVIRT_LAZY_NONE).
+ *
+ * So, when we're in lazy mode, we call async_hypercall() to store the call for
+ * future processing.  When lazy mode is turned off we issue a hypercall to
+ * flush the stored calls.
+ *
+ * There's also a hack where mode is set to PARAVIRT_LAZY_FLUSH which
+ * indicates we're to flush any outstanding calls immediately.  This is used
+ * when an interrupt handler does a kmap_atomic(): the page table changes must
+ * happen immediately even if we're in the middle of a batch.  Usually we're
+ * not, though, so there's nothing to do. */
+static enum paravirt_lazy_mode lazy_mode; /* Note: not SMP-safe! */
 static void lguest_lazy_mode(enum paravirt_lazy_mode mode)
 {
if (mode == PARAVIRT_LAZY_FLUSH) {
@@ -108,6 +133,16 @@ static void lazy_hcall(unsigned long call,
async_hcall(call, arg1, arg2, arg3);
 }
 
+/* async_hcall() is pretty simple: I'm quite proud of it really.  We have a
+ * ring buffer of stored hypercalls which the Host will run though next time we
+ * do a normal hypercall.  Each entry in the ring has 4 slots for the hypercall
+ * arguments, and a hcall_status word which is 0 if the call is ready to go,
+ * and 255 once the Host has finished with it.
+ *
+ * If we come around to a slot which hasn't been finished, then the table is
+ * full and we just make the hypercall directly.  This has the nice side
+ * effect of causing the Host to run all the stored calls in the ring buffer
+ * which empties it for next time! */
 void async_hcall(unsigned long call,
 unsigned long arg1, unsigned long arg2, unsigned long arg3)
 {
@@ -115,6 +150,9 @@ void async_hcall(unsigned long call,
static unsigned int next_call;
unsigned long flags;
 
+   /* Disable interrupts if not already disabled: we don't want an
+* interrupt handler making a hypercall while we're already doing
+* one! */
local_irq_save(flags);
if (lguest_data.hcall_status[next_call] != 0xFF) {
/* Table full, so do normal hcall which will flush table. */
@@ -124,7 +162,7 @@ void async_hcall(unsigned long call,
lguest_data.hcalls[next_call].edx = arg1;
lguest_data.hcalls[next_call].ebx = arg2;
lguest_data.hcalls[next_call].ecx = arg3;
-   /* Make sure host sees arguments before valid flag. */
+   /* Arguments must all be written before we mark it to go */
wmb();
lguest_data.hcall_status[next_call] = 0;
if (++next_call == LHCALL_RING_SIZE)
@@ -132,9 +170,14 @@ void async_hcall(unsigned long call,
}
local_irq_restore(flags);
 }
+/*:*/
 
+/* Wrappers for the SEND_DMA and BIND_DMA hypercalls.  This is mainly because
+ * Jeff 

lguest: documentation I: Preparation

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f938d2c892db0d80d144253d4a7b7083efdbedeb
Commit: f938d2c892db0d80d144253d4a7b7083efdbedeb
Parent: dfb68689bf3e3d31dc9fb5c2bde5379a4ca9b0ec
Author: Rusty Russell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:02 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:16 2007 -0700

lguest: documentation I: Preparation

The netfilter code had very good documentation: the Netfilter Hacking HOWTO.
Noone ever read it.

So this time I'm trying something different, using a bit of Knuthiness.

Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/lguest/extract  |   58 +
 Documentation/lguest/lguest.c |9 -
 drivers/lguest/Makefile   |   12 +++
 drivers/lguest/README |   47 ++
 drivers/lguest/core.c |7 +++-
 drivers/lguest/hypercalls.c   |9 -
 drivers/lguest/interrupts_and_traps.c |   13 +++
 drivers/lguest/io.c   |8 +++-
 drivers/lguest/lguest.c   |   30 -
 drivers/lguest/lguest_bus.c   |3 ++
 drivers/lguest/lguest_user.c  |7 +++-
 drivers/lguest/page_tables.c  |   10 -
 drivers/lguest/segments.c |   11 ++
 drivers/lguest/switcher.S |   13 ---
 14 files changed, 218 insertions(+), 19 deletions(-)

diff --git a/Documentation/lguest/extract b/Documentation/lguest/extract
new file mode 100644
index 000..7730bb6
--- /dev/null
+++ b/Documentation/lguest/extract
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+set -e
+
+PREFIX=$1
+shift
+
+trap 'rm -r $TMPDIR' 0
+TMPDIR=`mktemp -d`
+
+exec 3/dev/null
+for f; do
+while IFS=
+ read -r LINE; do
+   case $LINE in
+   *$PREFIX:[0-9]*:\**)
+   NUM=`echo $LINE | sed s/.*$PREFIX:\([0-9]*\).*/\1/`
+   if [ -f $TMPDIR/$NUM ]; then
+   echo $TMPDIR/$NUM already exits prior to $f
+   exit 1
+   fi
+   exec 3$TMPDIR/$NUM
+   echo $f | sed 's,\.\./,,g'  $TMPDIR/.$NUM
+   /bin/echo $LINE | sed -e s/$PREFIX:[0-9]*// -e s/:\*/*/ 
3
+   ;;
+   *$PREFIX:[0-9]*)
+   NUM=`echo $LINE | sed s/.*$PREFIX:\([0-9]*\).*/\1/`
+   if [ -f $TMPDIR/$NUM ]; then
+   echo $TMPDIR/$NUM already exits prior to $f
+   exit 1
+   fi
+   exec 3$TMPDIR/$NUM
+   echo $f | sed 's,\.\./,,g'  $TMPDIR/.$NUM
+   /bin/echo $LINE | sed s/$PREFIX:[0-9]*// 3
+   ;;
+   *:\**)
+   /bin/echo $LINE | sed -e s/:\*/*/ -e s,/\*\*/,, 3
+   echo 3
+   exec 3/dev/null
+   ;;
+   *)
+   /bin/echo $LINE 3
+   ;;
+   esac
+done  $f
+echo 3
+exec 3/dev/null
+done
+
+LASTFILE=
+for f in $TMPDIR/*; do
+if [ $LASTFILE != $(cat $TMPDIR/.$(basename $f) ) ]; then
+   LASTFILE=$(cat $TMPDIR/.$(basename $f) )
+   echo [ $LASTFILE ]
+fi
+cat $f
+done
+
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 62a8133..fc1bf70 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1,5 +1,10 @@
-/* Simple program to layout physical memory for new lguest guest.
- * Linked high to avoid likely physical memory.  */
+/*P:100 This is the Launcher code, a simple program which lays out the
+ * physical memory for the new Guest by mapping the kernel image and the
+ * virtual devices, then reads repeatedly from /dev/lguest to run the Guest.
+ *
+ * The only trick: the Makefile links it at a high address so it will be clear
+ * of the guest memory region.  It means that each Guest cannot have more than
+ * about 2.5G of memory on a normally configured Host. :*/
 #define _LARGEFILE64_SOURCE
 #define _GNU_SOURCE
 #include stdio.h
diff --git a/drivers/lguest/Makefile b/drivers/lguest/Makefile
index 55382c7..e504747 100644
--- a/drivers/lguest/Makefile
+++ b/drivers/lguest/Makefile
@@ -5,3 +5,15 @@ obj-$(CONFIG_LGUEST_GUEST) += lguest.o lguest_asm.o 
lguest_bus.o
 obj-$(CONFIG_LGUEST)   += lg.o
 lg-y := core.o hypercalls.o page_tables.o interrupts_and_traps.o \
segments.o io.o lguest_user.o switcher.o
+
+Preparation Preparation!: PREFIX=P
+Guest: PREFIX=G
+Drivers: PREFIX=D
+Launcher: PREFIX=L
+Host: PREFIX=H
+Switcher: PREFIX=S
+Mastery: PREFIX=M
+Beer:
+   @for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do 
echo {==- $$f -==}; make -s $$f; done; echo {==-==}
+Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery:
+   @sh ../../Documentation/lguest/extract 

PM: fix compiler error of PPC dart_iommu

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=70f38db60cc5c8c6c3a95f0d2e6360272d6014a3
Commit: 70f38db60cc5c8c6c3a95f0d2e6360272d6014a3
Parent: 415ad26d8c8665a0fcfc18552daf411a9bc1a41e
Author: Ryusuke Konishi [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:40:59 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:16 2007 -0700

PM: fix compiler error of PPC dart_iommu

A dummy inline function of register_nosave_region_late was accidentally
removed by the recent PM patch that introduced suspend notifiers.
This elimination causes the following compiler error on PPC machines.

  CC  arch/powerpc/sysdev/dart_iommu.o
arch/powerpc/sysdev/dart_iommu.c: In function 'iommu_init_late_dart':
arch/powerpc/sysdev/dart_iommu.c:376: error: implicit declaration of 
function
'register_nosave_region_late'
make[1]: *** [arch/powerpc/sysdev/dart_iommu.o] Error 1
make: *** [arch/powerpc/sysdev] Error 2

This patch fixes the problem.

Signed-off-by: Ryusuke Konishi [EMAIL PROTECTED]
Acked-by: Rafael J. Wysocki [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/suspend.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index e8e6da3..618f93c 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -125,6 +125,9 @@ static inline int unregister_pm_notifier(struct 
notifier_block *nb)
 static inline void register_nosave_region(unsigned long b, unsigned long e)
 {
 }
+static inline void register_nosave_region_late(unsigned long b, unsigned long 
e)
+{
+}
 #endif
 
 #endif /* _LINUX_SWSUSP_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


tiny signalfd cleanup

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f50cadaa8ffa72ad430e5beabe02eb752f3f72a3
Commit: f50cadaa8ffa72ad430e5beabe02eb752f3f72a3
Parent: 87588dd6663b6f306f03f2deaec0d0fd3f0cb26e
Author: Ulrich Drepper [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:40:55 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:33:06 2007 -0700

tiny signalfd cleanup

This is probably a leftover from a time when the return wasn't there yet.
Now the extra assignment is just irritating.

Signed-off-by: Ulrich Drepper [EMAIL PROTECTED]
Cc: Davide Libenzi [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/signalfd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/signalfd.c b/fs/signalfd.c
index 3b07f26..7b941ab 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -320,7 +320,7 @@ asmlinkage long sys_signalfd(int ufd, sigset_t __user 
*user_mask, size_t sizemas
 
if (sizemask != sizeof(sigset_t) ||
copy_from_user(sigmask, user_mask, sizeof(sigmask)))
-   return error = -EINVAL;
+   return -EINVAL;
sigdelsetmask(sigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
signotset(sigmask);
 
-
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


arm unaligned.h annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60262e58e305f27d05eefeda172117521514f364
Commit: 60262e58e305f27d05eefeda172117521514f364
Parent: e7cf261b447ed7edbf7c10c046e078bda799afaf
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:46:19 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

arm unaligned.h annotations

Have put_unaligned() warn if types would be wrong
for assignment, slap force-casts where needed.  Cast the
result of get_unaligned to typeof(*ptr).  With that in
place we get proper typechecking, both from gcc and from sparse,
including that for bitwise types.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-arm/unaligned.h |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/asm-arm/unaligned.h b/include/asm-arm/unaligned.h
index 795b9e5..8431f6e 100644
--- a/include/asm-arm/unaligned.h
+++ b/include/asm-arm/unaligned.h
@@ -60,24 +60,24 @@ extern int __bug_unaligned_x(const void *ptr);
__get_unaligned_4_be((__p+4)))
 
 #define __get_unaligned_le(ptr)
\
-   ({  \
+   ((__force typeof(*(ptr)))({ \
const __u8 *__p = (const __u8 *)(ptr);  \
__builtin_choose_expr(sizeof(*(ptr)) == 1, *__p,\
  __builtin_choose_expr(sizeof(*(ptr)) == 2, 
__get_unaligned_2_le(__p), \
  __builtin_choose_expr(sizeof(*(ptr)) == 4, 
__get_unaligned_4_le(__p), \
  __builtin_choose_expr(sizeof(*(ptr)) == 8, 
__get_unaligned_8_le(__p), \
(void)__bug_unaligned_x(__p);   \
-   })
+   }))
 
 #define __get_unaligned_be(ptr)
\
-   ({  \
+   ((__force typeof(*(ptr)))({ \
const __u8 *__p = (const __u8 *)(ptr);  \
__builtin_choose_expr(sizeof(*(ptr)) == 1, *__p,\
  __builtin_choose_expr(sizeof(*(ptr)) == 2, 
__get_unaligned_2_be(__p), \
  __builtin_choose_expr(sizeof(*(ptr)) == 4, 
__get_unaligned_4_be(__p), \
  __builtin_choose_expr(sizeof(*(ptr)) == 8, 
__get_unaligned_8_be(__p), \
(void)__bug_unaligned_x(__p);   \
-   })
+   }))
 
 
 static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p)
@@ -131,15 +131,16 @@ static inline void __put_unaligned_8_be(const unsigned 
long long __v, register _
  */
 #define __put_unaligned_le(val,ptr)\
({  \
+   (void)sizeof(*(ptr) = (val));   \
switch (sizeof(*(ptr))) {   \
case 1: \
*(ptr) = (val); \
break;  \
-   case 2: __put_unaligned_2_le((val),(__u8 *)(ptr));  \
+   case 2: __put_unaligned_2_le((__force u16)(val),(__u8 *)(ptr)); 
\
break;  \
-   case 4: __put_unaligned_4_le((val),(__u8 *)(ptr));  \
+   case 4: __put_unaligned_4_le((__force u32)(val),(__u8 *)(ptr)); 
\
break;  \
-   case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); \
+   case 8: __put_unaligned_8_le((__force u64)(val),(__u8 *)(ptr)); 
\
break;  \
default: __bug_unaligned_x(ptr);\
break;  \
@@ -149,15 +150,16 @@ static inline void __put_unaligned_8_be(const unsigned 
long long __v, register _
 
 #define __put_unaligned_be(val,ptr)\
({  \
+   (void)sizeof(*(ptr) = (val));   \
switch (sizeof(*(ptr))) {   \
case 1: \
*(ptr) = (val); \
break;  \
-   case 2: __put_unaligned_2_be((val),(__u8 *)(ptr));  \
+   case 2: __put_unaligned_2_be((__force u16)(val),(__u8 *)(ptr)); 
\
break;  \
- 

raw1394 __user annotation

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5b26e64ea39e45802c5736c8261bf8a8704d212f
Commit: 5b26e64ea39e45802c5736c8261bf8a8704d212f
Parent: 0bd8496b5977f6acfd3c16358045c315d610b765
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:36:19 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

raw1394 __user annotation

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/ieee1394/raw1394.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 336e5ff..cadf047 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -2677,7 +2677,7 @@ static long raw1394_iso_xmit_recv_packets32(struct file 
*file, unsigned int cmd,
   struct raw1394_iso_packets32 __user 
*arg)
 {
compat_uptr_t infos32;
-   void *infos;
+   void __user *infos;
long err = -EFAULT;
struct raw1394_iso_packets __user *dst = 
compat_alloc_user_space(sizeof(struct raw1394_iso_packets));
 
-
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


xfs ioctl __user annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad690ef9e690f6c31f7d310b09ef1314bcec9033
Commit: ad690ef9e690f6c31f7d310b09ef1314bcec9033
Parent: 97f1e7f7d2cd950f90d64ac6920822e709095519
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:59 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

xfs ioctl __user annotations

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/xfs/linux-2.6/xfs_ioctl32.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 141cf15..42319d7 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -139,7 +139,7 @@ STATIC int xfs_inumbers_fmt_compat(
long count,
long *written)
 {
-   compat_xfs_inogrp_t *p32 = ubuffer;
+   compat_xfs_inogrp_t __user *p32 = ubuffer;
long i;
 
for (i = 0; i  count; i++) {
@@ -444,7 +444,7 @@ xfs_compat_ioctl(
case XFS_IOC_FSINUMBERS_32:
cmd = _NATIVE_IOC(cmd, struct xfs_fsop_bulkreq);
return xfs_ioc_bulkstat_compat(XFS_BHVTOI(VNHEAD(vp))-i_mount,
-   cmd, (void*)arg);
+   cmd, (void __user*)arg);
case XFS_IOC_FD_TO_HANDLE_32:
case XFS_IOC_PATH_TO_HANDLE_32:
case XFS_IOC_PATH_TO_FSHANDLE_32:
-
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


amd64: fix get_user() on bitwise

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fdd33961e983dd5b1983c54ef39d243c88a4bffc
Commit: fdd33961e983dd5b1983c54ef39d243c88a4bffc
Parent: c47ffe3d3d841986108a8316f6e01792cb45d0d2
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:39 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

amd64: fix get_user() on bitwise

We really need force-cast when converting to final result type;
unsigned long can be silently converted to integer types and
to pointers, but not to bitwise.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-x86_64/uaccess.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index 9df30b9..f4ce876 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -100,7 +100,7 @@ struct exception_table_entry
case 8:  __get_user_x(8,__ret_gu,__val_gu,ptr); break;  \
default: __get_user_bad(); break;   \
}   \
-   (x) = (typeof(*(ptr)))__val_gu; \
+   (x) = (__force typeof(*(ptr)))__val_gu; \
__ret_gu;   \
 })
 
@@ -192,7 +192,7 @@ struct __large_struct { unsigned long buf[100]; };
int __gu_err;   \
unsigned long __gu_val; \
__get_user_size(__gu_val,(ptr),(size),__gu_err);\
-   (x) = (typeof(*(ptr)))__gu_val; \
+   (x) = (__force typeof(*(ptr)))__gu_val; \
__gu_err;   \
 })
 
-
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


cxgb3 gfp_t annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f41bb3a5a24c82900b33071edcedec679b99de7
Commit: 1f41bb3a5a24c82900b33071edcedec679b99de7
Parent: af3b162afd9fce69a94d79bd5b1f9c7c302212f4
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:19 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

cxgb3 gfp_t annotations

Signed-off-by: Al Viro [EMAIL PROTECTED]
Acked-by: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/net/cxgb3/cxgb3_offload.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_offload.c 
b/drivers/net/cxgb3/cxgb3_offload.c
index ebcf35e..e620ed4 100644
--- a/drivers/net/cxgb3/cxgb3_offload.c
+++ b/drivers/net/cxgb3/cxgb3_offload.c
@@ -699,7 +699,7 @@ static int do_cr(struct t3cdev *dev, struct sk_buff *skb)
  * the buffer.
  */
 static struct sk_buff *cxgb3_get_cpl_reply_skb(struct sk_buff *skb, size_t len,
-  int gfp)
+  gfp_t gfp)
 {
if (likely(!skb_cloned(skb))) {
BUG_ON(skb-len  len);
-
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


use CLOCKSOURCE_MASK() instead of too large constant

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=712aaa1cb1c0a83e5ffb5376e1d7ee3dd539f4e4
Commit: 712aaa1cb1c0a83e5ffb5376e1d7ee3dd539f4e4
Parent: d5c03726a7d0700222fe3c134c6ef834040974c5
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:34:49 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

use CLOCKSOURCE_MASK() instead of too large constant

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/ia64/kernel/time.c |2 +-
 drivers/char/hpet.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 1169d46..6c0e9e2 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -52,7 +52,7 @@ static struct clocksource clocksource_itc = {
 .name   = itc,
 .rating = 350,
 .read   = itc_get_cycles,
-.mask   = 0x,
+.mask   = CLOCKSOURCE_MASK(64),
 .mult   = 0, /*to be caluclated*/
 .shift  = 16,
 .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 9a2694e..77bf4aa 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -73,7 +73,7 @@ static struct clocksource clocksource_hpet = {
 .name   = hpet,
 .rating = 250,
 .read   = read_hpet,
-.mask   = 0x,
+.mask   = CLOCKSOURCE_MASK(64),
 .mult   = 0, /*to be caluclated*/
 .shift  = 10,
 .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
-
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


initramfs: missing __init

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b0a5ab93158586e599ecd0d24a9a72da74d23ddd
Commit: b0a5ab93158586e599ecd0d24a9a72da74d23ddd
Parent: ca5c8cde93d65db3139604ca6b91bf8ff3f775e2
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:59 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

initramfs: missing __init

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 init/initramfs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 00eff7a..1db02a0 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -133,7 +133,7 @@ static __initdata loff_t this_header, next_header;
 
 static __initdata int dry_run;
 
-static inline void eat(unsigned n)
+static inline void __init eat(unsigned n)
 {
victim += n;
this_header += 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


net/* misc endianness annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=582ee43dad8e411513a74f2d801255dcffc6d29e
Commit: 582ee43dad8e411513a74f2d801255dcffc6d29e
Parent: 704eae1f32274c0435f7f3924077afdb811edd1d
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:39 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

net/* misc endianness annotations

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/bridge/br_input.c |6 +++---
 net/key/af_key.c  |4 ++--
 net/rxrpc/ar-connection.c |2 +-
 net/sunrpc/svcsock.c  |4 ++--
 net/tipc/msg.h|6 ++
 5 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 420bbb9..5c18595 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -112,9 +112,9 @@ static int br_handle_local_finish(struct sk_buff *skb)
  */
 static inline int is_link_local(const unsigned char *dest)
 {
-   const u16 *a = (const u16 *) dest;
-   static const u16 *const b = (const u16 *const ) br_group_address;
-   static const u16 m = __constant_cpu_to_be16(0xfff0);
+   __be16 *a = (__be16 *)dest;
+   static const __be16 *b = (const __be16 *)br_group_address;
+   static const __be16 m = __constant_cpu_to_be16(0xfff0);
 
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | ((a[2] ^ b[2])  m)) == 0;
 }
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 0f8304b..7b0a95a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2540,7 +2540,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff 
*skb,
sel.proto = pfkey_proto_to_xfrm(sa-sadb_address_proto);
sel.sport = ((struct sockaddr_in *)(sa + 1))-sin_port;
if (sel.sport)
-   sel.sport_mask = ~0;
+   sel.sport_mask = htons(0x);
 
/* set destination address info of selector */
sa = ext_hdrs[SADB_EXT_ADDRESS_DST - 1],
@@ -2549,7 +2549,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff 
*skb,
sel.proto = pfkey_proto_to_xfrm(sa-sadb_address_proto);
sel.dport = ((struct sockaddr_in *)(sa + 1))-sin_port;
if (sel.dport)
-   sel.dport_mask = ~0;
+   sel.dport_mask = htons(0x);
 
rq = (struct sadb_x_ipsecrequest *)(pol + 1);
 
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
index 372b244..d6667f7 100644
--- a/net/rxrpc/ar-connection.c
+++ b/net/rxrpc/ar-connection.c
@@ -71,7 +71,7 @@ struct rxrpc_conn_bundle *rxrpc_get_bundle(struct rxrpc_sock 
*rx,
struct rb_node *p, *parent, **pp;
 
_enter(%p{%x},%x,%hx,,
-  rx, key_serial(key), trans-debug_id, ntohl(service_id));
+  rx, key_serial(key), trans-debug_id, ntohs(service_id));
 
if (rx-trans == trans  rx-bundle) {
atomic_inc(rx-bundle-usage);
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 64b9b8c..12ff5da 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -131,13 +131,13 @@ static char *__svc_print_addr(struct sockaddr *addr, char 
*buf, size_t len)
case AF_INET:
snprintf(buf, len, %u.%u.%u.%u, port=%u,
NIPQUAD(((struct sockaddr_in *) addr)-sin_addr),
-   htons(((struct sockaddr_in *) addr)-sin_port));
+   ntohs(((struct sockaddr_in *) addr)-sin_port));
break;
 
case AF_INET6:
snprintf(buf, len, %x:%x:%x:%x:%x:%x:%x:%x, port=%u,
NIP6(((struct sockaddr_in6 *) addr)-sin6_addr),
-   htons(((struct sockaddr_in6 *) addr)-sin6_port));
+   ntohs(((struct sockaddr_in6 *) addr)-sin6_port));
break;
 
default:
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 35d5ba1..ce26598 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -72,10 +72,8 @@ static inline void msg_set_bits(struct tipc_msg *m, u32 w,
u32 pos, u32 mask, u32 val)
 {
val = (val  mask)  pos;
-   val = htonl(val);
-   mask = htonl(mask  pos);
-   m-hdr[w] = ~mask;
-   m-hdr[w] |= val;
+   m-hdr[w] = ~htonl(mask  pos);
+   m-hdr[w] |= htonl(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


netfilter endian regressions

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a34c45896a723ee7b13128ac8bf564ea42fcd1eb
Commit: a34c45896a723ee7b13128ac8bf564ea42fcd1eb
Parent: e0e5de00b0ee5a3b652d829f2c1e89265e9c6a99
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:19 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

netfilter endian regressions

no real bugs, just misannotations cropping up

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/netfilter/xt_connlimit.h |4 ++--
 include/net/netfilter/nf_conntrack_tuple.h |4 ++--
 net/ipv4/netfilter/nf_nat_core.c   |3 ++-
 net/ipv4/netfilter/nf_nat_rule.c   |2 +-
 net/netfilter/nf_conntrack_core.c  |3 ++-
 net/netfilter/nf_conntrack_expect.c|8 
 net/netfilter/nf_conntrack_helper.c|2 +-
 net/netfilter/xt_connlimit.c   |6 +++---
 net/netfilter/xt_u32.c |   11 ++-
 9 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/include/linux/netfilter/xt_connlimit.h 
b/include/linux/netfilter/xt_connlimit.h
index 90ae8b4..37e933c 100644
--- a/include/linux/netfilter/xt_connlimit.h
+++ b/include/linux/netfilter/xt_connlimit.h
@@ -5,8 +5,8 @@ struct xt_connlimit_data;
 
 struct xt_connlimit_info {
union {
-   u_int32_t v4_mask;
-   u_int32_t v6_mask[4];
+   __be32 v4_mask;
+   __be32 v6_mask[4];
};
unsigned int limit, inverse;
 
diff --git a/include/net/netfilter/nf_conntrack_tuple.h 
b/include/net/netfilter/nf_conntrack_tuple.h
index 040dae5..c48e390 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -35,7 +35,7 @@ union nf_conntrack_address {
 union nf_conntrack_man_proto
 {
/* Add other protocols here. */
-   u_int16_t all;
+   __be16 all;
 
struct {
__be16 port;
@@ -73,7 +73,7 @@ struct nf_conntrack_tuple
union nf_conntrack_address u3;
union {
/* Add other protocols here. */
-   u_int16_t all;
+   __be16 all;
 
struct {
__be16 port;
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index e848d8d..deab27f 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -77,7 +77,8 @@ static inline unsigned int
 hash_by_src(const struct nf_conntrack_tuple *tuple)
 {
/* Original src, to ensure we map it consistently if poss. */
-   return jhash_3words((__force u32)tuple-src.u3.ip, tuple-src.u.all,
+   return jhash_3words((__force u32)tuple-src.u3.ip,
+   (__force u32)tuple-src.u.all,
tuple-dst.protonum, 0) % nf_nat_htable_size;
 }
 
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
index 0f45427..76ec59a 100644
--- a/net/ipv4/netfilter/nf_nat_rule.c
+++ b/net/ipv4/netfilter/nf_nat_rule.c
@@ -192,7 +192,7 @@ alloc_null_binding_confirmed(struct nf_conn *ct, unsigned 
int hooknum)
= (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC
   ? ct-tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3.ip
   : ct-tuplehash[IP_CT_DIR_REPLY].tuple.src.u3.ip);
-   u_int16_t all
+   __be16 all
= (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC
   ? ct-tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.all
   : ct-tuplehash[IP_CT_DIR_REPLY].tuple.src.u.all);
diff --git a/net/netfilter/nf_conntrack_core.c 
b/net/netfilter/nf_conntrack_core.c
index aa086c8..0fe1188 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -79,7 +79,8 @@ static u_int32_t __hash_conntrack(const struct 
nf_conntrack_tuple *tuple,
a = jhash2(tuple-src.u3.all, ARRAY_SIZE(tuple-src.u3.all),
   (tuple-src.l3num  16) | tuple-dst.protonum);
b = jhash2(tuple-dst.u3.all, ARRAY_SIZE(tuple-dst.u3.all),
-  (tuple-src.u.all  16) | tuple-dst.u.all);
+  ((__force __u16)tuple-src.u.all  16) |
+   (__force __u16)tuple-dst.u.all);
 
return jhash_2words(a, b, rnd) % size;
 }
diff --git a/net/netfilter/nf_conntrack_expect.c 
b/net/netfilter/nf_conntrack_expect.c
index 1aa6229..eb6695d 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -80,7 +80,7 @@ static unsigned int nf_ct_expect_dst_hash(const struct 
nf_conntrack_tuple *tuple
 
return jhash2(tuple-dst.u3.all, ARRAY_SIZE(tuple-dst.u3.all),
  (((tuple-dst.protonum ^ tuple-src.l3num)  16) |
-  tuple-dst.u.all) ^ nf_ct_expect_hash_rnd) %
+  

[POWERPC] spufs: Fix incorrect initialization of cbe_spu_info.spus

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6f6a6dc0c8ebdb6514ab6bb58ba4b8739957b342
Commit: 6f6a6dc0c8ebdb6514ab6bb58ba4b8739957b342
Parent: 17cd87c26bd86546ea3217397ef3428581970058
Author: Masato Noguchi [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 13:20:15 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:55 2007 +1000

[POWERPC] spufs: Fix incorrect initialization of cbe_spu_info.spus

We currently initialize cbe_spu_info[].spus in both init_spu_base and
spu_sched_init. The initialise in spu_sched_init clears the SPU list,
so we end up with no physical SPUs. Because of this, the spu_run
syscall will block forever.

This change removes the unnecessary initialization in spu_sched_init.

Signed-off-by: Masato Noguchi [EMAIL PROTECTED]
Signed-off-by: Jeremy Kerr [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/cell/spufs/sched.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c 
b/arch/powerpc/platforms/cell/spufs/sched.c
index 227968b..758a80a 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -927,10 +927,6 @@ int __init spu_sched_init(void)
INIT_LIST_HEAD(spu_prio-runq[i]);
__clear_bit(i, spu_prio-bitmap);
}
-   for (i = 0; i  MAX_NUMNODES; i++) {
-   mutex_init(cbe_spu_info[i].list_mutex);
-   INIT_LIST_HEAD(cbe_spu_info[i].spus);
-   }
spin_lock_init(spu_prio-runq_lock);
 
setup_timer(spusched_timer, spusched_wake, 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


[PATCH] sched: update Documentation/sched-stats.txt

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b762f3ffb797c1281a38a1c82194534055fba5ec
Commit: b762f3ffb797c1281a38a1c82194534055fba5ec
Parent: f33734619371ae40f34bbce001938408e6634f05
Author: Joachim Deguara [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: update Documentation/sched-stats.txt

While learning about schedstats I found that the documentation in the tree
is old.  I updated it and found some interesting stuff like schedstats
version 14 is the same as version and version 13 never saw a kernel
release!  Also there are 6 fields in the current schedstats that are not
used anymore.  Nick had made them irrelevant in commit
476d139c218e44e045e4bc6d4cc02b010b343939 but never removed them.

Thanks to Rick's perl script who I borrowed some of the updated descriptions
from.

Signed-off-by: Joachim Deguara [EMAIL PROTECTED]
Acked-by: Nick Piggin [EMAIL PROTECTED]
Cc: Rick Lindsley [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 Documentation/sched-stats.txt |  195 +
 1 files changed, 99 insertions(+), 96 deletions(-)

diff --git a/Documentation/sched-stats.txt b/Documentation/sched-stats.txt
index 6f72021..442e14d 100644
--- a/Documentation/sched-stats.txt
+++ b/Documentation/sched-stats.txt
@@ -1,10 +1,11 @@
-Version 10 of schedstats includes support for sched_domains, which
-hit the mainline kernel in 2.6.7.  Some counters make more sense to be
-per-runqueue; other to be per-domain.  Note that domains (and their associated
-information) will only be pertinent and available on machines utilizing
-CONFIG_SMP.
-
-In version 10 of schedstat, there is at least one level of domain
+Version 14 of schedstats includes support for sched_domains, which hit the
+mainline kernel in 2.6.20 although it is identical to the stats from version
+12 which was in the kernel from 2.6.13-2.6.19 (version 13 never saw a kernel
+release).  Some counters make more sense to be per-runqueue; other to be
+per-domain.  Note that domains (and their associated information) will only
+be pertinent and available on machines utilizing CONFIG_SMP.
+
+In version 14 of schedstat, there is at least one level of domain
 statistics for each cpu listed, and there may well be more than one
 domain.  Domains have no particular names in this implementation, but
 the highest numbered one typically arbitrates balancing across all the
@@ -27,7 +28,7 @@ to write their own scripts, the fields are described here.
 
 CPU statistics
 --
-cpuN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28
+cpuN 1 2 3 4 5 6 7 8 9 10 11 12
 
 NOTE: In the sched_yield() statistics, the active queue is considered empty
 if it has only one process in it, since obviously the process calling
@@ -39,48 +40,20 @@ First four fields are sched_yield() statistics:
  3) # of times just the expired queue was empty
  4) # of times sched_yield() was called
 
-Next four are schedule() statistics:
- 5) # of times the active queue had at least one other process on it
- 6) # of times we switched to the expired queue and reused it
- 7) # of times schedule() was called
- 8) # of times schedule() left the processor idle
-
-Next four are active_load_balance() statistics:
- 9) # of times active_load_balance() was called
-10) # of times active_load_balance() caused this cpu to gain a task
-11) # of times active_load_balance() caused this cpu to lose a task
-12) # of times active_load_balance() tried to move a task and failed
-
-Next three are try_to_wake_up() statistics:
-13) # of times try_to_wake_up() was called
-14) # of times try_to_wake_up() successfully moved the awakening task
-15) # of times try_to_wake_up() attempted to move the awakening task
-
-Next two are wake_up_new_task() statistics:
-16) # of times wake_up_new_task() was called
-17) # of times wake_up_new_task() successfully moved the new task
-
-Next one is a sched_migrate_task() statistic:
-18) # of times sched_migrate_task() was called
+Next three are schedule() statistics:
+ 5) # of times we switched to the expired queue and reused it
+ 6) # of times schedule() was called
+ 7) # of times schedule() left the processor idle
 
-Next one is a sched_balance_exec() statistic:
-19) # of times sched_balance_exec() was called
+Next two are try_to_wake_up() statistics:
+ 8) # of times try_to_wake_up() was called
+ 9) # of times try_to_wake_up() was called to wake up the local cpu
 
 Next three are statistics describing scheduling latency:
-20) sum of all time spent running by tasks on this processor (in ms)
-21) sum of all time spent waiting to run by tasks on 

[PATCH] sched: add above_background_load() function

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d02c7a8cf208eb80a3ccbff40a6bebe8902af35a
Commit: d02c7a8cf208eb80a3ccbff40a6bebe8902af35a
Parent: b762f3ffb797c1281a38a1c82194534055fba5ec
Author: Con Kolivas [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: add above_background_load() function

Add an above_background_load() function which can be used by other
subsystems to detect if there is anything besides niced tasks running.

Place it in sched.h to allow it to be compiled out if not used.

Unused for now, but it is a useful hint to the IO scheduler and to
swap-prefetch.

Signed-off-by: Con Kolivas [EMAIL PROTECTED]
Cc: Peter Williams [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 include/linux/sched.h |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7a4de87..2e49027 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -786,6 +786,22 @@ extern int partition_sched_domains(cpumask_t *partition1,
 
 #endif /* CONFIG_SMP */
 
+/*
+ * A runqueue laden with a single nice 0 task scores a weighted_cpuload of
+ * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
+ * task of nice 0 or enough lower priority tasks to bring up the
+ * weighted_cpuload
+ */
+static inline int above_background_load(void)
+{
+   unsigned long cpu;
+
+   for_each_online_cpu(cpu) {
+   if (weighted_cpuload(cpu) = SCHED_LOAD_SCALE)
+   return 1;
+   }
+   return 0;
+}
 
 struct io_context; /* See blkdev.h */
 struct cpuset;
-
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


[PATCH] sched: debug feature - make the sched-domains tree runtime-tweakable

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e692ab53473c93c0d0820618c97aa74a62ab67da
Commit: e692ab53473c93c0d0820618c97aa74a62ab67da
Parent: d02c7a8cf208eb80a3ccbff40a6bebe8902af35a
Author: Nick Piggin [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 13:40:43 2007 +0200
Committer:  Ingo Molnar [EMAIL PROTECTED]
CommitDate: Thu Jul 26 13:40:43 2007 +0200

[PATCH] sched: debug feature - make the sched-domains tree runtime-tweakable

debugging feature: make the sched-domains tree runtime-tweakable.

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
[ [EMAIL PROTECTED]: made it depend on CONFIG_SCHED_DEBUG  small updates ]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
 kernel/sched.c |  122 
 1 files changed, 122 insertions(+), 0 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 3eed860..5c51d7e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -53,6 +53,7 @@
 #include linux/percpu.h
 #include linux/kthread.h
 #include linux/seq_file.h
+#include linux/sysctl.h
 #include linux/syscalls.h
 #include linux/times.h
 #include linux/tsacct_kern.h
@@ -5202,10 +5203,129 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
if (!next)
break;
migrate_dead(dead_cpu, next);
+
}
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
+#if defined(CONFIG_SCHED_DEBUG)  defined(CONFIG_SYSCTL)
+
+static struct ctl_table sd_ctl_dir[] = {
+   {CTL_UNNUMBERED, sched_domain, NULL, 0, 0755, NULL, },
+   {0,},
+};
+
+static struct ctl_table sd_ctl_root[] = {
+   {CTL_UNNUMBERED, kernel, NULL, 0, 0755, sd_ctl_dir, },
+   {0,},
+};
+
+static struct ctl_table *sd_alloc_ctl_entry(int n)
+{
+   struct ctl_table *entry =
+   kmalloc(n * sizeof(struct ctl_table), GFP_KERNEL);
+
+   BUG_ON(!entry);
+   memset(entry, 0, n * sizeof(struct ctl_table));
+
+   return entry;
+}
+
+static void
+set_table_entry(struct ctl_table *entry, int ctl_name,
+   const char *procname, void *data, int maxlen,
+   mode_t mode, proc_handler *proc_handler)
+{
+   entry-ctl_name = ctl_name;
+   entry-procname = procname;
+   entry-data = data;
+   entry-maxlen = maxlen;
+   entry-mode = mode;
+   entry-proc_handler = proc_handler;
+}
+
+static struct ctl_table *
+sd_alloc_ctl_domain_table(struct sched_domain *sd)
+{
+   struct ctl_table *table = sd_alloc_ctl_entry(14);
+
+   set_table_entry(table[0], 1, min_interval, sd-min_interval,
+   sizeof(long), 0644, proc_doulongvec_minmax);
+   set_table_entry(table[1], 2, max_interval, sd-max_interval,
+   sizeof(long), 0644, proc_doulongvec_minmax);
+   set_table_entry(table[2], 3, busy_idx, sd-busy_idx,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[3], 4, idle_idx, sd-idle_idx,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[4], 5, newidle_idx, sd-newidle_idx,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[5], 6, wake_idx, sd-wake_idx,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[6], 7, forkexec_idx, sd-forkexec_idx,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[7], 8, busy_factor, sd-busy_factor,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[8], 9, imbalance_pct, sd-imbalance_pct,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[9], 10, cache_hot_time, sd-cache_hot_time,
+   sizeof(long long), 0644, proc_doulongvec_minmax);
+   set_table_entry(table[10], 11, cache_nice_tries,
+   sd-cache_nice_tries,
+   sizeof(int), 0644, proc_dointvec_minmax);
+   set_table_entry(table[12], 13, flags, sd-flags,
+   sizeof(int), 0644, proc_dointvec_minmax);
+
+   return table;
+}
+
+static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
+{
+   struct ctl_table *entry, *table;
+   struct sched_domain *sd;
+   int domain_num = 0, i;
+   char buf[32];
+
+   for_each_domain(cpu, sd)
+   domain_num++;
+   entry = table = sd_alloc_ctl_entry(domain_num + 1);
+
+   i = 0;
+   for_each_domain(cpu, sd) {
+   snprintf(buf, 32, domain%d, i);
+   entry-ctl_name = i + 1;
+   entry-procname = kstrdup(buf, GFP_KERNEL);
+   entry-mode = 0755;
+   entry-child = sd_alloc_ctl_domain_table(sd);
+   entry++;
+   i++;
+   }
+   return table;
+}
+
+static struct ctl_table_header *sd_sysctl_header;
+static void init_sched_domain_sysctl(void)
+{
+   int i, cpu_num = num_online_cpus();
+   struct ctl_table *entry = sd_alloc_ctl_entry(cpu_num + 1);
+

[POWERPC] Fix register labels on show_regs() message for 4xx/Book-E

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=141707892e92dca69b7b8af65b9367da2d1f8120
Commit: 141707892e92dca69b7b8af65b9367da2d1f8120
Parent: d1c813123f3beebcffb8446929e0e917defda67f
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 00:46:15 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:46:15 2007 -0500

[POWERPC] Fix register labels on show_regs() message for 4xx/Book-E

In a show_regs()  message The DEAR and ESR were reported as
DAR and DSISR which only exist on classic parts.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/kernel/process.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 84f000a..a83727b 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs)
printk(  CR: %08lx  XER: %08lx\n, regs-ccr, regs-xer);
trap = TRAP(regs);
if (trap == 0x300 || trap == 0x600)
+#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+   printk(DEAR: REG, ESR: REG\n, regs-dar, regs-dsisr);
+#else
printk(DAR: REG, DSISR: REG\n, regs-dar, regs-dsisr);
+#endif
printk(TASK = %p[%d] '%s' THREAD: %p,
   current, current-pid, current-comm, task_thread_info(current));
 
-
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


[POWERPC] Make pci_iounmap actually unmap things

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50747cb8189d54369d75e1bd73f84db431d39af8
Commit: 50747cb8189d54369d75e1bd73f84db431d39af8
Parent: 6dfbde209171cd15407e7540d363a434a489aaca
Author: Benjamin Herrenschmidt [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 14:07:13 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:48 2007 +1000

[POWERPC] Make pci_iounmap actually unmap things

This patch uses the newly added functions for testing if an address is
an ISA or PCI IO port to properly unmap things in pci_iounmap that
aren't such ports.  Without that, drivers using the iomap API will never
actually unmap resources, which on IBM server machines will prevent
hot-unplug of the corresponding HW adapters.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/iomap.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 601ef79..2a5cf86 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -7,6 +7,7 @@
 #include linux/pci.h
 #include linux/mm.h
 #include asm/io.h
+#include asm/pci-bridge.h
 
 /*
  * Here comes the ppc64 implementation of the IOMAP 
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, 
unsigned long max)
 
 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
 {
-   /* Nothing to do */
+   if (isa_vaddr_is_ioport(addr))
+   return;
+   if (pcibios_vaddr_is_ioport(addr))
+   return;
+   iounmap(addr);
 }
+
 EXPORT_SYMBOL(pci_iomap);
 EXPORT_SYMBOL(pci_iounmap);
-
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: use setup_irq() in ColdFire PIT timer

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c4525da3b43ab194b99ea13142fa1f98fcba2fe
Commit: 5c4525da3b43ab194b99ea13142fa1f98fcba2fe
Parent: 65fdef9303a69dab1f693159f6262375322dd676
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: use setup_irq() in ColdFire PIT timer

Use setup_irq() instead of request_irq() to set up system timer
in ColdFire PIT timer code. With the old m68knommu irq code this
was safe, but it is not now within the generic irq framework.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/5307/pit.c |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/m68knommu/platform/5307/pit.c 
b/arch/m68knommu/platform/5307/pit.c
index aa15bee..e53c446 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -5,9 +5,8 @@
  *  hardware timer only exists in the Freescale ColdFire
  *  5270/5271, 5282 and other CPUs.
  *
- * Copyright (C) 1999-2006, Greg Ungerer ([EMAIL PROTECTED])
+ * Copyright (C) 1999-2007, Greg Ungerer ([EMAIL PROTECTED])
  * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com)
- *
  */
 
 /***/
@@ -17,8 +16,8 @@
 #include linux/param.h
 #include linux/init.h
 #include linux/interrupt.h
+#include linux/irq.h
 #include asm/io.h
-#include asm/irq.h
 #include asm/coldfire.h
 #include asm/mcfpit.h
 #include asm/mcfsim.h
@@ -43,13 +42,18 @@ void coldfire_pit_tick(void)
 
 /***/
 
+static struct irqaction coldfire_pit_irq = {
+   .name= timer,
+   .flags   = IRQF_DISABLED | IRQF_TIMER,
+};
+
 void coldfire_pit_init(irq_handler_t handler)
 {
volatile unsigned char *icrp;
volatile unsigned long *imrp;
 
-   request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED,
-   ColdFire Timer, NULL);
+   coldfire_pit_irq.handler = handler;
+   setup_irq(MCFINT_VECBASE + MCFINT_PIT1, coldfire_pit_irq);
 
icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
MCFINTC_ICR0 + MCFINT_PIT1);
-
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


Revert most of x86: Fix alternatives and kprobes to remap write-protected kernel text

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=602033ed5907a59ce86f709082a35be047743a86
Commit: 602033ed5907a59ce86f709082a35be047743a86
Parent: 07d4e9af109221ab731c5aaf832e89776c64b013
Author: Linus Torvalds [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 12:07:21 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 12:07:21 2007 -0700

Revert most of x86: Fix alternatives and kprobes to remap write-protected 
kernel text

This reverts most of commit 19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177.

The way to DEBUG_RODATA interactions with KPROBES and CPU hotplug is to
just not mark the text as being write-protected in the first place.
Both of those facilities depend on rewriting instructions.

Having helpful debug facilities that just cause more problem is not
being helpful.  It just adds complexity and bugs. Not worth it.

Reported-by: Rafael J. Wysocki [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Cc: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/i386/kernel/alternative.c |   14 ++
 arch/i386/mm/init.c|   14 +++---
 arch/x86_64/mm/init.c  |   10 ++
 3 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index c3750c2..c85598a 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -430,22 +430,12 @@ void __init alternative_instructions(void)
  * And on the local CPU you need to be protected again NMI or MCE handlers
  * seeing an inconsistent instruction while you patch.
  */
-void __kprobes text_poke(void *oaddr, unsigned char *opcode, int len)
+void __kprobes text_poke(void *addr, unsigned char *opcode, int len)
 {
-u8 *addr = oaddr;
-   if (!pte_write(*lookup_address((unsigned long)addr))) {
-   struct page *p[2] = { virt_to_page(addr), 
virt_to_page(addr+PAGE_SIZE) };
-   addr = vmap(p, 2, VM_MAP, PAGE_KERNEL);
-   if (!addr)
-   return;
-   addr += ((unsigned long)oaddr) % PAGE_SIZE;
-   }
memcpy(addr, opcode, len);
sync_core();
/* Not strictly needed, but can speed CPU recovery up. Ignore cross 
cacheline
   case. */
if (cpu_has_clflush)
-   asm(clflush (%0)  :: r (oaddr) : memory);
-   if (addr != oaddr)
-   vunmap(addr);
+   asm(clflush (%0)  :: r (addr) : memory);
 }
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index 1b1a1e6..4c4809f 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -800,9 +800,17 @@ void mark_rodata_ro(void)
unsigned long start = PFN_ALIGN(_text);
unsigned long size = PFN_ALIGN(_etext) - start;
 
-   change_page_attr(virt_to_page(start),
-size  PAGE_SHIFT, PAGE_KERNEL_RX);
-   printk(Write protecting the kernel text: %luk\n, size  10);
+#ifndef CONFIG_KPROBES
+#ifdef CONFIG_HOTPLUG_CPU
+   /* It must still be possible to apply SMP alternatives. */
+   if (num_possible_cpus() = 1)
+#endif
+   {
+   change_page_attr(virt_to_page(start),
+size  PAGE_SHIFT, PAGE_KERNEL_RX);
+   printk(Write protecting the kernel text: %luk\n, size  10);
+   }
+#endif
start += size;
size = (unsigned long)__end_rodata - start;
change_page_attr(virt_to_page(start),
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 38f5d63..458893b 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -600,6 +600,16 @@ void mark_rodata_ro(void)
 {
unsigned long start = (unsigned long)_stext, end;
 
+#ifdef CONFIG_HOTPLUG_CPU
+   /* It must still be possible to apply SMP alternatives. */
+   if (num_possible_cpus()  1)
+   start = (unsigned long)_etext;
+#endif
+
+#ifdef CONFIG_KPROBES
+   start = (unsigned long)__start_rodata;
+#endif
+   
end = (unsigned long)__end_rodata;
start = (start + PAGE_SIZE - 1)  PAGE_MASK;
end = PAGE_MASK;
-
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_64: fix section mismatch warnings in tce

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=252c01dc272c4b56bf1ab8582b3031682de153b3
Commit: 252c01dc272c4b56bf1ab8582b3031682de153b3
Parent: ddcc3050bddc267f8d6e811bd930e885729f900b
Author: Sam Ravnborg [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:16 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:19 2007 -0700

x86_64: fix section mismatch warnings in tce

Fix the following two section mismatch warnings:

WARNING: vmlinux.o(.text+0x1ce84): Section mismatch: reference to 
.init.text:free_bootmem (between 'free_tce_table' and 'build_tce_table')
WARNING: vmlinux.o(.text+0x1d04d): Section mismatch: reference to 
.init.text:__alloc_bootmem_low (between 'alloc_tce_table' and 
'kretprobe_trampoline_holder')

In both cases the functions was used only from __init
context so mark them __init.

Signed-off-by: Sam Ravnborg [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86_64/kernel/tce.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c
index 3aeae2f..821527e 100644
--- a/arch/x86_64/kernel/tce.c
+++ b/arch/x86_64/kernel/tce.c
@@ -165,7 +165,7 @@ done:
return ret;
 }
 
-void* alloc_tce_table(void)
+void * __init alloc_tce_table(void)
 {
unsigned int size;
 
@@ -175,7 +175,7 @@ void* alloc_tce_table(void)
return __alloc_bootmem_low(size, size, 0);
 }
 
-void free_tce_table(void *tbl)
+void __init free_tce_table(void *tbl)
 {
unsigned int 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


m68k {in,out}_le{16,32} endianness misannotation

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e7cf261b447ed7edbf7c10c046e078bda799afaf
Commit: e7cf261b447ed7edbf7c10c046e078bda799afaf
Parent: c7b17cb13eaad6adf2f169840ccb193d4376e4b1
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:42:59 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

m68k {in,out}_le{16,32} endianness misannotation

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-m68k/raw_io.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h
index 91c623f..d9eb983 100644
--- a/include/asm-m68k/raw_io.h
+++ b/include/asm-m68k/raw_io.h
@@ -36,15 +36,15 @@ extern void __iounmap(void *addr, unsigned long size);
 #define in_be32(addr) \
 ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; })
 #define in_le16(addr) \
-({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; })
+({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; })
 #define in_le32(addr) \
-({ u32 __v = le32_to_cpu(*(__force volatile u32 *) (addr)); __v; })
+({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; })
 
 #define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
 #define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w))
 #define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l))
-#define out_le16(addr,w) (void)((*(__force volatile u16 *) (addr)) = 
cpu_to_le16(w))
-#define out_le32(addr,l) (void)((*(__force volatile u32 *) (addr)) = 
cpu_to_le32(l))
+#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (addr)) = 
cpu_to_le16(w))
+#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = 
cpu_to_le32(l))
 
 #define raw_inb in_8
 #define raw_inw in_be16
-
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


make powerpc BUG_ON() OK with pointers and bitwise

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97f1e7f7d2cd950f90d64ac6920822e709095519
Commit: 97f1e7f7d2cd950f90d64ac6920822e709095519
Parent: fdd33961e983dd5b1983c54ef39d243c88a4bffc
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:49 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

make powerpc BUG_ON() OK with pointers and bitwise

Since powerpc insists on printing the _value_ of condition
and on casting it to long...  At least let's make it a force-cast.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-powerpc/bug.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h
index f6fa394..a248b8b 100644
--- a/include/asm-powerpc/bug.h
+++ b/include/asm-powerpc/bug.h
@@ -79,7 +79,7 @@
_EMIT_BUG_ENTRY \
: : i (__FILE__), i (__LINE__), i (0),\
  i (sizeof(struct bug_entry)),   \
- r ((long)(x))); \
+ r ((__force long)(x))); \
}   \
 } while (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


misannotation in pppol2tp

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af3b162afd9fce69a94d79bd5b1f9c7c302212f4
Commit: af3b162afd9fce69a94d79bd5b1f9c7c302212f4
Parent: 6aa8b04975e71fb3d67bec7fbe2995b9bf54a06e
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:35:09 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

misannotation in pppol2tp

Address of auto variable is not a userland pointer.  A good thing, too,
since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
as argument, it would be an instant roothole...

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/net/pppol2tp.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index f871760..266e8b3 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -2054,7 +2054,7 @@ end:
  */
 static int pppol2tp_tunnel_getsockopt(struct sock *sk,
  struct pppol2tp_tunnel *tunnel,
- int optname, int __user *val)
+ int optname, int *val)
 {
int err = 0;
 
@@ -2077,7 +2077,7 @@ static int pppol2tp_tunnel_getsockopt(struct sock *sk,
  */
 static int pppol2tp_session_getsockopt(struct sock *sk,
   struct pppol2tp_session *session,
-  int optname, int __user *val)
+  int optname, int *val)
 {
int err = 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


ip6_tunnel - endianness annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=704eae1f32274c0435f7f3924077afdb811edd1d
Commit: 704eae1f32274c0435f7f3924077afdb811edd1d
Parent: a34c45896a723ee7b13128ac8bf564ea42fcd1eb
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:33:29 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:56 2007 -0700

ip6_tunnel - endianness annotations

Convert rel_info to host-endian before calling ip6_tnl_err().
The things become much more straightforward that way.
The key observation (and the reason why that code actually
worked) is that after ip6_tnl_err() we either immediately
bailed out or had rel_info set to 0 or had it set to host-endian
and guaranteed to hit
(rel_type == ICMP_DEST_UNREACH  rel_code == ICMP_FRAG_NEEDED)
case.  So inconsistent endianness didn't really lead to bugs,
but it had been subtle and prone to breakage.  New variant is
saner and obviously safe.

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/ipv6/ip6_tunnel.c |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index df30976..ca774d8 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -385,7 +385,7 @@ parse_tlv_tnl_enc_lim(struct sk_buff *skb, __u8 * raw)
 
 static int
 ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct inet6_skb_parm *opt,
-   int *type, int *code, int *msg, __be32 *info, int offset)
+   int *type, int *code, int *msg, __u32 *info, int offset)
 {
struct ipv6hdr *ipv6h = (struct ipv6hdr *) skb-data;
struct ip6_tnl *t;
@@ -435,7 +435,7 @@ ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct 
inet6_skb_parm *opt,
if ((*code) == ICMPV6_HDR_FIELD)
teli = parse_tlv_tnl_enc_lim(skb, skb-data);
 
-   if (teli  teli == ntohl(*info) - 2) {
+   if (teli  teli == *info - 2) {
tel = (struct ipv6_tlv_tnl_enc_lim *) skb-data[teli];
if (tel-encap_limit == 0) {
if (net_ratelimit())
@@ -452,7 +452,7 @@ ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct 
inet6_skb_parm *opt,
}
break;
case ICMPV6_PKT_TOOBIG:
-   mtu = ntohl(*info) - offset;
+   mtu = *info - offset;
if (mtu  IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
t-dev-mtu = mtu;
@@ -478,12 +478,12 @@ out:
 
 static int
 ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
-  int type, int code, int offset, __u32 info)
+  int type, int code, int offset, __be32 info)
 {
int rel_msg = 0;
int rel_type = type;
int rel_code = code;
-   __u32 rel_info = info;
+   __u32 rel_info = ntohl(info);
int err;
struct sk_buff *skb2;
struct iphdr *eiph;
@@ -564,10 +564,9 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
goto out;
 
skb2-dst-ops-update_pmtu(skb2-dst, rel_info);
-   rel_info = htonl(rel_info);
}
 
-   icmp_send(skb2, rel_type, rel_code, rel_info);
+   icmp_send(skb2, rel_type, rel_code, htonl(rel_info));
 
 out:
kfree_skb(skb2);
@@ -576,12 +575,12 @@ out:
 
 static int
 ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
-  int type, int code, int offset, __u32 info)
+  int type, int code, int offset, __be32 info)
 {
int rel_msg = 0;
int rel_type = type;
int rel_code = code;
-   __u32 rel_info = info;
+   __u32 rel_info = ntohl(info);
int err;
 
err = ip6_tnl_err(skb, IPPROTO_IPV6, opt, rel_type, rel_code,
-
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


drivers/mmc/core/: make 3 functions static

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=393618510d5349e07d71dc28fb6fc49baf0d96a0
Commit: 393618510d5349e07d71dc28fb6fc49baf0d96a0
Parent: facba9179e3cd5fa91ff40bbc555c5cd4c101092
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 00:40:58 2007 +0200
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Thu Jul 26 02:05:57 2007 +0200

drivers/mmc/core/: make 3 functions static

This patch makes the following needlessly global functions static:
- sd_ops.c: mmc_app_cmd()
- core.c: __mmc_release_bus()
- core.c: mmc_start_request()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/core/core.c   |   63 
 drivers/mmc/core/core.h   |   22 ---
 drivers/mmc/core/sd_ops.c |   58 
 drivers/mmc/core/sd_ops.h |1 -
 4 files changed, 69 insertions(+), 75 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d089684..bfd2ae5 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -102,15 +102,7 @@ void mmc_request_done(struct mmc_host *host, struct 
mmc_request *mrq)
 
 EXPORT_SYMBOL(mmc_request_done);
 
-/**
- * mmc_start_request - start a command on a host
- * @host: MMC host to start command on
- * @mrq: MMC request to start
- *
- * Queue a command on the specified host.  We expect the
- * caller to be holding the host lock with interrupts disabled.
- */
-void
+static void
 mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
 {
 #ifdef CONFIG_MMC_DEBUG
@@ -165,8 +157,6 @@ mmc_start_request(struct mmc_host *host, struct mmc_request 
*mrq)
host-ops-request(host, mrq);
 }
 
-EXPORT_SYMBOL(mmc_start_request);
-
 static void mmc_wait_done(struct mmc_request *mrq)
 {
complete(mrq-done_data);
@@ -472,6 +462,45 @@ static void mmc_power_off(struct mmc_host *host)
 }
 
 /*
+ * Cleanup when the last reference to the bus operator is dropped.
+ */
+void __mmc_release_bus(struct mmc_host *host)
+{
+   BUG_ON(!host);
+   BUG_ON(host-bus_refs);
+   BUG_ON(!host-bus_dead);
+
+   host-bus_ops = NULL;
+}
+
+/*
+ * Increase reference count of bus operator
+ */
+static inline void mmc_bus_get(struct mmc_host *host)
+{
+   unsigned long flags;
+
+   spin_lock_irqsave(host-lock, flags);
+   host-bus_refs++;
+   spin_unlock_irqrestore(host-lock, flags);
+}
+
+/*
+ * Decrease reference count of bus operator and free it if
+ * it is the last reference.
+ */
+static inline void mmc_bus_put(struct mmc_host *host)
+{
+   unsigned long flags;
+
+   spin_lock_irqsave(host-lock, flags);
+   host-bus_refs--;
+   if ((host-bus_refs == 0)  host-bus_ops)
+   __mmc_release_bus(host);
+   spin_unlock_irqrestore(host-lock, flags);
+}
+
+/*
  * Assign a mmc bus handler to a host. Only one bus handler may control a
  * host at any given time.
  */
@@ -520,18 +549,6 @@ void mmc_detach_bus(struct mmc_host *host)
mmc_bus_put(host);
 }
 
-/*
- * Cleanup when the last reference to the bus operator is dropped.
- */
-void __mmc_release_bus(struct mmc_host *host)
-{
-   BUG_ON(!host);
-   BUG_ON(host-bus_refs);
-   BUG_ON(!host-bus_dead);
-
-   host-bus_ops = NULL;
-}
-
 /**
  * mmc_detect_change - process change of state on a MMC socket
  * @host: host which changed state.
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index ae006b3..bb2774a 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -27,28 +27,6 @@ struct mmc_bus_ops {
 void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops);
 void mmc_detach_bus(struct mmc_host *host);
 
-void __mmc_release_bus(struct mmc_host *host);
-
-static inline void mmc_bus_get(struct mmc_host *host)
-{
-   unsigned long flags;
-
-   spin_lock_irqsave(host-lock, flags);
-   host-bus_refs++;
-   spin_unlock_irqrestore(host-lock, flags);
-}
-
-static inline void mmc_bus_put(struct mmc_host *host)
-{
-   unsigned long flags;
-
-   spin_lock_irqsave(host-lock, flags);
-   host-bus_refs--;
-   if ((host-bus_refs == 0)  host-bus_ops)
-   __mmc_release_bus(host);
-   spin_unlock_irqrestore(host-lock, flags);
-}
-
 void mmc_set_chip_select(struct mmc_host *host, int mode);
 void mmc_set_clock(struct mmc_host *host, unsigned int hz);
 void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index ee9a1b9..342f340 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -21,6 +21,35 @@
 #include core.h
 #include sd_ops.h
 
+static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
+{
+   int err;
+   struct mmc_command cmd;
+
+   BUG_ON(!host);
+   BUG_ON(card  (card-host 

[POWERPC] Fix PCI indirect for big-endian cfg_addr

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7659c038d3d0a635b5aeff04aed523d7b6c1dde8
Commit: 7659c038d3d0a635b5aeff04aed523d7b6c1dde8
Parent: 0de085bb474f64e4fdb2f1ff3268590792648c7b
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 00:29:53 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Wed Jul 25 00:29:53 2007 -0500

[POWERPC] Fix PCI indirect for big-endian cfg_addr

We didn't actually propogate the flag we pass into setup_indirect_pci()
to set indirect_type and thus were getting the wrong endianness if
PPC_INDIRECT_TYPE_BIG_ENDIAN was set.

Also, we need to or in additional flags rather than just doing a
direct assignment.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/sysdev/fsl_pci.c  |2 +-
 arch/powerpc/sysdev/indirect_pci.c |1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 51c2233..8712227 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -216,7 +216,7 @@ int __init fsl_add_bridge(struct device_node *dev, int 
is_primary)
 
/* check PCI express link status */
if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
-   hose-indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
+   hose-indirect_type |= PPC_INDIRECT_TYPE_EXT_REG |
PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
if (fsl_pcie_check_link(hose))
hose-indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
diff --git a/arch/powerpc/sysdev/indirect_pci.c 
b/arch/powerpc/sysdev/indirect_pci.c
index a8ac2df..5294560 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -160,4 +160,5 @@ setup_indirect_pci(struct pci_controller* hose, u32 
cfg_addr, u32 cfg_data, u32
mbase = ioremap(cfg_data  PAGE_MASK, PAGE_SIZE);
hose-cfg_data = mbase + (cfg_data  ~PAGE_MASK);
hose-ops = indirect_pci_ops;
+   hose-indirect_type = 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


Fix ThinkPad T42 poweroff failure introduced by by PM: Introduce pm_power_off_prepare

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58b3b71dfaaecbf7cff1fe10c049d663f0313e5f
Commit: 58b3b71dfaaecbf7cff1fe10c049d663f0313e5f
Parent: 602033ed5907a59ce86f709082a35be047743a86
Author: Rafael J. Wysocki [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 16:29:55 2007 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 12:13:06 2007 -0700

Fix ThinkPad T42 poweroff failure introduced by by PM: Introduce 
pm_power_off_prepare

Commit bd804eba1c8597cbb7cd5a5f9fe886aae16a079a (PM: Introduce
pm_power_off_prepare) caused problems in the poweroff path, as reported by
YOSHIFUJI Hideaki / 吉藤英明.

Generally, sysdev_shutdown() should be called after the ACPI preparation for
powering the system off.  To make it happen, we can separate 
sysdev_shutdown()
from device_shutdown() and call it directly wherever necessary.

Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
Tested-by: YOSHIFUJI Hideaki / 吉藤英明 [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/base/power/shutdown.c |2 --
 include/linux/device.h|3 +++
 kernel/power/disk.c   |1 +
 kernel/sys.c  |3 +++
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c
index a47ee1b..56e8eaa 100644
--- a/drivers/base/power/shutdown.c
+++ b/drivers/base/power/shutdown.c
@@ -44,7 +44,5 @@ void device_shutdown(void)
dev-driver-shutdown(dev);
}
}
-
-   sysdev_shutdown();
 }
 
diff --git a/include/linux/device.h b/include/linux/device.h
index d9f0a57..3a38d1f 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -551,6 +551,9 @@ extern void put_device(struct device * dev);
 /* drivers/base/power/shutdown.c */
 extern void device_shutdown(void);
 
+/* drivers/base/sys.c */
+extern void sysdev_shutdown(void);
+
 
 /* drivers/base/firmware.c */
 extern int __must_check firmware_register(struct kset *);
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 324ac01..eb72255 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -216,6 +216,7 @@ int hibernation_platform_enter(void)
 * sleep state after all
 */
error = hibernation_ops-prepare();
+   sysdev_shutdown();
if (!error)
error = hibernation_ops-enter();
} else {
diff --git a/kernel/sys.c b/kernel/sys.c
index 08562f4..14f8adc 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -804,6 +804,7 @@ static void kernel_restart_prepare(char *cmd)
blocking_notifier_call_chain(reboot_notifier_list, SYS_RESTART, cmd);
system_state = SYSTEM_RESTART;
device_shutdown();
+   sysdev_shutdown();
 }
 
 /**
@@ -860,6 +861,7 @@ void kernel_shutdown_prepare(enum system_states state)
 void kernel_halt(void)
 {
kernel_shutdown_prepare(SYSTEM_HALT);
+   sysdev_shutdown();
printk(KERN_EMERG System halted.\n);
machine_halt();
 }
@@ -876,6 +878,7 @@ void kernel_power_off(void)
kernel_shutdown_prepare(SYSTEM_POWER_OFF);
if (pm_power_off_prepare)
pm_power_off_prepare();
+   sysdev_shutdown();
printk(KERN_EMERG Power down.\n);
machine_power_off();
 }
-
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


make timerfd return a u64 and fix the __put_user

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=098284020c47c1212d211e39ae2b41c21182e056
Commit: 098284020c47c1212d211e39ae2b41c21182e056
Parent: a1cdd4a64f6ce15a1e81759ef99eed3a91f9acbe
Author: Davide Libenzi [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:07 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

make timerfd return a u64 and fix the __put_user

Davi fixed a missing cast in the __put_user(), that was making timerfd
return a single byte instead of the full value.

Talking with Michael about the timerfd man page, we think it'd be better to
use a u64 for the returned value, to align it with the eventfd
implementation.

This is an ABI change.  The timerfd code is new in 2.6.22 and if we merge 
this
into 2.6.23 then we should also merge it into 2.6.22.x.  That will leave a 
few
early 2.6.22 kernels out in the wild which might misbehave when a future
timerfd-enabled glibc is run on them.

mtk says: The difference would be that read() will only return 4 bytes, 
while
the application will expect 8.  If the application is checking the size of
returned value, as it should, then it will be able to detect the problem (it
could even be sophisticated enough to know that if this is a 4-byte return,
then it is running on an old 2.6.22 kernel).  If the application is not
checking the return from read(), then its 8-byte buffer will not be filled 
--
the contents of the last 4 bytes will be undefined, so the u64 value as a
whole will be junk.

Signed-off-by: Davide Libenzi [EMAIL PROTECTED]
Cc: Michael Kerrisk [EMAIL PROTECTED]
Cc: Davi Arnaut [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/timerfd.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/timerfd.c b/fs/timerfd.c
index af9eca5..61983f3 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -95,7 +95,7 @@ static ssize_t timerfd_read(struct file *file, char __user 
*buf, size_t count,
 {
struct timerfd_ctx *ctx = file-private_data;
ssize_t res;
-   u32 ticks = 0;
+   u64 ticks = 0;
DECLARE_WAITQUEUE(wait, current);
 
if (count  sizeof(ticks))
@@ -130,7 +130,7 @@ static ssize_t timerfd_read(struct file *file, char __user 
*buf, size_t count,
 * callback to avoid DoS attacks specifying a very
 * short timer period.
 */
-   ticks = (u32)
+   ticks = (u64)
hrtimer_forward(ctx-tmr,
hrtimer_cb_get_time(ctx-tmr),
ctx-tintv);
@@ -140,7 +140,7 @@ static ssize_t timerfd_read(struct file *file, char __user 
*buf, size_t count,
}
spin_unlock_irq(ctx-wqh.lock);
if (ticks)
-   res = put_user(ticks, buf) ? -EFAULT: sizeof(ticks);
+   res = put_user(ticks, (u64 __user *) buf) ? -EFAULT: 
sizeof(ticks);
return res;
 }
 
-
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


lguest: documentation VI: Switcher

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8f0fdcd40449d318f8dc30c1b361b0b7f54134a
Commit: f8f0fdcd40449d318f8dc30c1b361b0b7f54134a
Parent: bff672e630a015d5b54c8bfb16160b7edc39a57c
Author: Rusty Russell [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:04 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

lguest: documentation VI: Switcher

Documentation: The Switcher

Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/lguest/core.c |   51 -
 drivers/lguest/switcher.S |  271 ++---
 2 files changed, 276 insertions(+), 46 deletions(-)

diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index c0f50b4..0a46e88 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -393,46 +393,89 @@ static void set_ts(void)
write_cr0(cr0|8);
 }
 
+/*S:010
+ * We are getting close to the Switcher.
+ *
+ * Remember that each CPU has two pages which are visible to the Guest when it
+ * runs on that CPU.  This has to contain the state for that Guest: we copy the
+ * state in just before we run the Guest.
+ *
+ * Each Guest has changed flags which indicate what has changed in the Guest
+ * since it last ran.  We saw this set in interrupts_and_traps.c and
+ * segments.c.
+ */
 static void copy_in_guest_info(struct lguest *lg, struct lguest_pages *pages)
 {
+   /* Copying all this data can be quite expensive.  We usually run the
+* same Guest we ran last time (and that Guest hasn't run anywhere else
+* meanwhile).  If that's not the case, we pretend everything in the
+* Guest has changed. */
if (__get_cpu_var(last_guest) != lg || lg-last_pages != pages) {
__get_cpu_var(last_guest) = lg;
lg-last_pages = pages;
lg-changed = CHANGED_ALL;
}
 
-   /* These are pretty cheap, so we do them unconditionally. */
+   /* These copies are pretty cheap, so we do them unconditionally: */
+   /* Save the current Host top-level page directory. */
pages-state.host_cr3 = __pa(current-mm-pgd);
+   /* Set up the Guest's page tables to see this CPU's pages (and no
+* other CPU's pages). */
map_switcher_in_guest(lg, pages);
+   /* Set up the two TSS members which tell the CPU what stack to use
+* for traps which do directly into the Guest (ie. traps at privilege
+* level 1). */
pages-state.guest_tss.esp1 = lg-esp1;
pages-state.guest_tss.ss1 = lg-ss1;
 
-   /* Copy direct trap entries. */
+   /* Copy direct-to-Guest trap entries. */
if (lg-changed  CHANGED_IDT)
copy_traps(lg, pages-state.guest_idt, default_idt_entries);
 
-   /* Copy all GDT entries but the TSS. */
+   /* Copy all GDT entries which the Guest can change. */
if (lg-changed  CHANGED_GDT)
copy_gdt(lg, pages-state.guest_gdt);
/* If only the TLS entries have changed, copy them. */
else if (lg-changed  CHANGED_GDT_TLS)
copy_gdt_tls(lg, pages-state.guest_gdt);
 
+   /* Mark the Guest as unchanged for next time. */
lg-changed = 0;
 }
 
+/* Finally: the code to actually call into the Switcher to run the Guest. */
 static void run_guest_once(struct lguest *lg, struct lguest_pages *pages)
 {
+   /* This is a dummy value we need for GCC's sake. */
unsigned int clobber;
 
+   /* Copy the guest-specific information into this CPU's struct
+* lguest_pages. */
copy_in_guest_info(lg, pages);
 
-   /* Put eflags on stack, lcall does rest: suitable for iret return. */
+   /* Now: we push the eflags register on the stack, then do an lcall.
+* This is how we change from using the kernel code segment to using
+* the dedicated lguest code segment, as well as jumping into the
+* Switcher.
+*
+* The lcall also pushes the old code segment (KERNEL_CS) onto the
+* stack, then the address of this call.  This stack layout happens to
+* exactly match the stack of an interrupt... */
asm volatile(pushf; lcall *lguest_entry
+/* This is how we tell GCC that %eax (a) and %ebx (b)
+ * are changed by this routine.  The = means output. */
 : =a(clobber), =b(clobber)
+/* %eax contains the pages pointer.  (0 refers to the
+ * 0-th argument above, ie a).  %ebx contains the
+ * physical address of the Guest's top-level page
+ * directory. */
 : 0(pages), 1(__pa(lg-pgdirs[lg-pgdidx].pgdir))
+/* We tell gcc that all these registers could change,
+   

ia64 time.c: ANSIfy

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8dc946307c45ab9a6f56c56371e1ccfb7155015e
Commit: 8dc946307c45ab9a6f56c56371e1ccfb7155015e
Parent: ed5f6561436a1a0b38f4130bdb1fed00f14e60b5
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:34:29 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

ia64 time.c: ANSIfy

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/ia64/kernel/time.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 627785c..1169d46 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -255,7 +255,7 @@ ia64_init_itm (void)
}
 }
 
-static cycle_t itc_get_cycles()
+static cycle_t itc_get_cycles(void)
 {
u64 lcycle, now, ret;
 
-
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


[POWERPC] Fix ethernet PHY support on MPC8544 DS

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9a9bcf4e00281cd135e69f8d996acbbeb5aef6d0
Commit: 9a9bcf4e00281cd135e69f8d996acbbeb5aef6d0
Parent: 2052d6d25decc04dc05beb99348b3d78f6e3490d
Author: Kumar Gala [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 00:07:36 2007 -0500
Committer:  Kumar Gala [EMAIL PROTECTED]
CommitDate: Thu Jul 26 00:07:36 2007 -0500

[POWERPC] Fix ethernet PHY support on MPC8544 DS

The MPC8544 dts needed to set the new phy-connection-type to rgmii-id
for the Vitesse PHY on the board to work properly.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/mpc8544ds.dts |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts 
b/arch/powerpc/boot/dts/mpc8544ds.dts
index 4a900c6..d8ee4a0 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -104,6 +104,7 @@
interrupts = 1d 2 1e 2 22 2;
interrupt-parent = mpic;
phy-handle = phy0;
+   phy-connection-type = rgmii-id;
};
 
[EMAIL PROTECTED] {
@@ -117,6 +118,7 @@
interrupts = 1f 2 20 2 21 2;
interrupt-parent = mpic;
phy-handle = phy1;
+   phy-connection-type = rgmii-id;
};
 
[EMAIL PROTECTED] {
-
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


[POWERPC] spusched: Fix initial timeslice calculation

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d78592ed72dbff1d8825207f8def07858a49768
Commit: 9d78592ed72dbff1d8825207f8def07858a49768
Parent: 6f6a6dc0c8ebdb6514ab6bb58ba4b8739957b342
Author: Christoph Hellwig [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 21:31:09 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Thu Jul 26 16:17:56 2007 +1000

[POWERPC] spusched: Fix initial timeslice calculation

Currently we calculate the first timeslice for every context
incorrectly - alloc_spu_context calls spu_set_timeslice before we set
ctx-prio so we always calculate the longest possible timeslice for the
lowest possible priority.

This patch makes sure to update the schedule-related fields before
calculating the timeslice and also makes sure we update the timeslice for
a non-running context when entering spu_run so a priority change affects
the context as soon as possible.

Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]
Signed-off-by: Jeremy Kerr [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/cell/spufs/context.c |3 ++-
 arch/powerpc/platforms/cell/spufs/run.c |4 
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/context.c 
b/arch/powerpc/platforms/cell/spufs/context.c
index 6694f86..9cb081c 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -59,7 +59,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
INIT_LIST_HEAD(ctx-aff_list);
if (gang)
spu_gang_add_ctx(gang, ctx);
-   ctx-cpus_allowed = current-cpus_allowed;
+
+   __spu_update_sched_info(ctx);
spu_set_timeslice(ctx);
ctx-stats.util_state = SPU_UTIL_IDLE_LOADED;
 
diff --git a/arch/powerpc/platforms/cell/spufs/run.c 
b/arch/powerpc/platforms/cell/spufs/run.c
index 0b50fa5..6abdd8f 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -312,6 +312,7 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 
*event)
spu_acquire(ctx);
if (ctx-state == SPU_STATE_SAVED) {
__spu_update_sched_info(ctx);
+   spu_set_timeslice(ctx);
 
ret = spu_activate(ctx, 0);
if (ret) {
@@ -322,6 +323,9 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 
*event)
/*
 * We have to update the scheduling priority under active_mutex
 * to protect against find_victim().
+*
+* No need to update the timeslice ASAP, it will get updated
+* once the current one has expired.
 */
spu_update_sched_info(ctx);
}
-
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


include/asm-:mips add missing edac h file

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39c29657fcf6060d71e04f1e52e5bb4b2999644f
Commit: 39c29657fcf6060d71e04f1e52e5bb4b2999644f
Parent: d4c1465b7de9686c4c5aa533b15c09ab014aab3a
Author: Doug Thompson [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:15 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

include/asm-:mips add missing edac h file

EDAC has a foundation to perform software memory scrubbing, but it requires 
a
per architecture (atomic_scrub) function for performing an atomic update
operation.  Under X86, this is done with a

lock:  add  [addr],0

in the file asm-x86/edac.h

This patch provides the MIPS arch with that atomic function, atomic_scrub() 
in

asm-mips/edac.h

Cc: Alan Cox [EMAIL PROTECTED]
Cc: Ralf Baechle [EMAIL PROTECTED]
Signed-off-by: Doug Thompson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-mips/edac.h |   35 +++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/edac.h b/include/asm-mips/edac.h
new file mode 100644
index 000..83719ee
--- /dev/null
+++ b/include/asm-mips/edac.h
@@ -0,0 +1,35 @@
+#ifndef ASM_EDAC_H
+#define ASM_EDAC_H
+
+/* ECC atomic, DMA, SMP and interrupt safe scrub function */
+
+static inline void atomic_scrub(void *va, u32 size)
+{
+   unsigned long *virt_addr = va;
+   unsigned long temp;
+   u32 i;
+
+   for (i = 0; i  size / sizeof(unsigned long); i++, virt_addr++) {
+
+   /*
+* Very carefully read and write to memory atomically
+* so we are interrupt, DMA and SMP safe.
+*
+* Intel: asm(lock; addl $0, %0::m(*virt_addr));
+*/
+
+   __asm__ __volatile__ (
+  .setmips3   \n
+   1: ll  %0, %1  # atomic_add\n
+  ll  %0, %1  # atomic_add\n
+  addu%0, $0  \n
+  sc  %0, %1  \n
+  beqz%0, 1b  \n
+  .setmips0   \n
+   : =r (temp), =m (*virt_addr)
+   : m (*virt_addr));
+
+   }
+}
+
+#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: use setup_irq() in 68360 timer code

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa1f1d10e6f80362123fd7f736011f3ddd3acf25
Commit: aa1f1d10e6f80362123fd7f736011f3ddd3acf25
Parent: c423941890daebe2205a11bca7b51907f2b13940
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: use setup_irq() in 68360 timer code

Use setup_irq() instead of request_irq() to set up system timer
in 68360 timer code. With the old m68knommu irq code this
was safe, but it is not now within the generic irq framework.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/68360/config.c |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/m68knommu/platform/68360/config.c 
b/arch/m68knommu/platform/68360/config.c
index 4ff13bd..155b72f 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -17,11 +17,11 @@
 #include linux/tty.h
 #include linux/console.h
 #include linux/interrupt.h
+#include linux/irq.h
 
 #include asm/setup.h
 #include asm/system.h
 #include asm/pgtable.h
-#include asm/irq.h
 #include asm/machdep.h
 #include asm/m68360.h
 
@@ -51,11 +51,15 @@ extern unsigned long int system_clock; //In kernel setup.c
 
 extern void config_M68360_irq(void);
 
+static struct irqaction m68360_timer_irq = {
+   .name= timer,
+   .flags   = IRQF_DISABLED | IRQF_TIMER,
+};
+
 void BSP_sched_init(irq_handler_t timer_routine)
 {
   unsigned char prescaler;
   unsigned short tgcr_save;
-  int return_value;
 
 #if 0
   /* Restart mode, Enable int, 32KHz, Enable timer */
@@ -86,10 +90,8 @@ void BSP_sched_init(irq_handler_t timer_routine)
   pquicc-timer_ter1 = 0x0003; /* clear timer events */
 
   /* enable timer 1 interrupt in CIMR */
-//  request_irq(IRQ_MACHSPEC | CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, 
timer, NULL);
-  //return_value = request_irq( CPMVEC_TIMER1, timer_routine, IRQ_FLG_LOCK, 
timer, NULL);
-  return_value = request_irq(CPMVEC_TIMER1 , timer_routine, IRQ_FLG_LOCK,
-  Timer, NULL);
+  m68360_timer_irq.handler = timer_routine;
+  setup_irq(CPMVEC_TIMER1, m68360_timer_irq);
 
   /* Start timer 1: */
   tgcr_save = (pquicc-timer_tgcr  0xfff0) | 0x0001;
-
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


alpha: long constant

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d5c03726a7d0700222fe3c134c6ef834040974c5
Commit: d5c03726a7d0700222fe3c134c6ef834040974c5
Parent: 8dc946307c45ab9a6f56c56371e1ccfb7155015e
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:34:39 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:57 2007 -0700

alpha: long constant

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-alpha/bitops.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index 3a0cbeb..9e71201 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -324,7 +324,7 @@ static inline int fls64(unsigned long x)
 {
unsigned long t, a, r;
 
-   t = __kernel_cmpbge (x, 0x0101010101010101);
+   t = __kernel_cmpbge (x, 0x0101010101010101UL);
a = __flsm1_tab[t];
t = __kernel_extbl (x, a);
r = a*8 + __flsm1_tab[t] + (x != 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


more reiserfs endianness annotations

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=87588dd6663b6f306f03f2deaec0d0fd3f0cb26e
Commit: 87588dd6663b6f306f03f2deaec0d0fd3f0cb26e
Parent: 60262e58e305f27d05eefeda172117521514f364
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 17:47:03 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:11:58 2007 -0700

more reiserfs endianness annotations

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/reiserfs/stree.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index b6f1259..981027d 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1042,7 +1042,8 @@ static char prepare_for_delete_or_cut(struct 
reiserfs_transaction_handle *th, st
pos = I_UNFM_NUM(s_ih);
 
while (le_ih_k_offset (s_ih) + (pos - 1) * blk_size  
n_new_file_length) {
-   __u32 *unfm, block;
+   __le32 *unfm;
+   __u32 block;
 
/* Each unformatted block deletion may involve one 
additional
 * bitmap block into the transaction, thereby the initial
@@ -1052,7 +1053,7 @@ static char prepare_for_delete_or_cut(struct 
reiserfs_transaction_handle *th, st
break;
}
 
-   unfm = (__u32 *)B_I_PITEM(p_s_bh, s_ih) + pos - 1;
+   unfm = (__le32 *)B_I_PITEM(p_s_bh, s_ih) + pos - 1;
block = get_block_num(unfm, 0);
 
if (block != 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


Reorder RTC Makefile

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0ca56b4bb24e01158cb5d87adafa4b76da1f044d
Commit: 0ca56b4bb24e01158cb5d87adafa4b76da1f044d
Parent: 3dd9fe8c397df68086e6a1b2160573abbe944813
Author: Alessandro Zummo [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:08 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:17 2007 -0700

Reorder RTC Makefile

Alphabetic reordering of the drivers in the rtc subsys makefile.

(akpm: merge this asap!  Makefiles are the source of many patch conflicts..)

Signed-off-by: Alessandro Zummo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/rtc/Makefile |   42 ++
 1 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7ede9e7..d3a33aa 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -15,34 +15,36 @@ rtc-core-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o
 rtc-core-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o
 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o
 
+# Keep the list ordered.
+
+obj-$(CONFIG_RTC_DRV_AT32AP700X)+= rtc-at32ap700x.o
+obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
+obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o
 obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o
-obj-$(CONFIG_RTC_DRV_X1205)+= rtc-x1205.o
-obj-$(CONFIG_RTC_DRV_ISL1208)  += rtc-isl1208.o
-obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
-obj-$(CONFIG_RTC_DRV_AT32AP700X)   += rtc-at32ap700x.o
+obj-$(CONFIG_RTC_DRV_DS1216)   += rtc-ds1216.o
 obj-$(CONFIG_RTC_DRV_DS1307)   += rtc-ds1307.o
+obj-$(CONFIG_RTC_DRV_DS1553)   += rtc-ds1553.o
 obj-$(CONFIG_RTC_DRV_DS1672)   += rtc-ds1672.o
 obj-$(CONFIG_RTC_DRV_DS1742)   += rtc-ds1742.o
+obj-$(CONFIG_RTC_DRV_EP93XX)   += rtc-ep93xx.o
+obj-$(CONFIG_RTC_DRV_ISL1208)  += rtc-isl1208.o
+obj-$(CONFIG_RTC_DRV_M41T80)   += rtc-m41t80.o
+obj-$(CONFIG_RTC_DRV_M48T59)   += rtc-m48t59.o
+obj-$(CONFIG_RTC_DRV_M48T86)   += rtc-m48t86.o
+obj-$(CONFIG_RTC_DRV_MAX6900)  += rtc-max6900.o
+obj-$(CONFIG_RTC_DRV_MAX6902)  += rtc-max6902.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_PCF8563)  += rtc-pcf8563.o
 obj-$(CONFIG_RTC_DRV_PCF8583)  += rtc-pcf8583.o
+obj-$(CONFIG_RTC_DRV_PL031)+= rtc-pl031.o
+obj-$(CONFIG_RTC_DRV_RS5C313)  += rtc-rs5c313.o
+obj-$(CONFIG_RTC_DRV_RS5C348)  += rtc-rs5c348.o
 obj-$(CONFIG_RTC_DRV_RS5C372)  += rtc-rs5c372.o
 obj-$(CONFIG_RTC_DRV_S3C)  += rtc-s3c.o
-obj-$(CONFIG_RTC_DRV_RS5C348)  += rtc-rs5c348.o
-obj-$(CONFIG_RTC_DRV_M41T80)   += rtc-m41t80.o
-obj-$(CONFIG_RTC_DRV_M48T86)   += rtc-m48t86.o
-obj-$(CONFIG_RTC_DRV_DS1553)   += rtc-ds1553.o
-obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
-obj-$(CONFIG_RTC_DRV_RS5C313)  += rtc-rs5c313.o
-obj-$(CONFIG_RTC_DRV_EP93XX)   += rtc-ep93xx.o
 obj-$(CONFIG_RTC_DRV_SA1100)   += rtc-sa1100.o
-obj-$(CONFIG_RTC_DRV_VR41XX)   += rtc-vr41xx.o
-obj-$(CONFIG_RTC_DRV_PL031)+= rtc-pl031.o
-obj-$(CONFIG_RTC_DRV_MAX6900)  += rtc-max6900.o
-obj-$(CONFIG_RTC_DRV_MAX6902)  += rtc-max6902.o
-obj-$(CONFIG_RTC_DRV_V3020)+= rtc-v3020.o
-obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
 obj-$(CONFIG_RTC_DRV_SH)   += rtc-sh.o
-obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o
-obj-$(CONFIG_RTC_DRV_M48T59)   += rtc-m48t59.o
-obj-$(CONFIG_RTC_DRV_DS1216)   += rtc-ds1216.o
+obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
+obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
+obj-$(CONFIG_RTC_DRV_V3020)+= rtc-v3020.o
+obj-$(CONFIG_RTC_DRV_VR41XX)   += rtc-vr41xx.o
+obj-$(CONFIG_RTC_DRV_X1205)+= rtc-x1205.o
-
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_64: fix arch_vma_name

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2ebc3cc920e7a076539aa8badbaf0919540a3438
Commit: 2ebc3cc920e7a076539aa8badbaf0919540a3438
Parent: 26b97237f7eee977eb8beb59adbbf0a8ab4f8276
Author: Roland McGrath [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:12 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:18 2007 -0700

x86_64: fix arch_vma_name

The function arch_vma_name() is declared weak and thus it was
not noticed that x86_64 had two almost identical implementations.

It was introduced in syscall32.c by: 
c633090e3105e779c97d4978e5e3d7d66b291cfb
It was introduced in mm/init.c by: 2aae950b21e4bc789d1fc6668faf67e8748300b7

Signed-off-by: Roland McGrath [EMAIL PROTECTED]
Acked-by: Sam Ravnborg [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86_64/ia32/ia32_binfmt.c |5 +++--
 arch/x86_64/ia32/syscall32.c   |8 
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index b70f3e7..dffd2ac 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -41,8 +41,9 @@ int sysctl_vsyscall32 = 1;
 #undef ARCH_DLINFO
 #define ARCH_DLINFO do {  \
if (sysctl_vsyscall32) { \
-   NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \
-   NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE);\
+   current-mm-context.vdso = (void *)VSYSCALL32_BASE;\
+   NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \
+   NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL32_BASE);\
}   \
 } while(0)
 
diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c
index fc4419f..15013ba 100644
--- a/arch/x86_64/ia32/syscall32.c
+++ b/arch/x86_64/ia32/syscall32.c
@@ -49,14 +49,6 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int 
exstack)
return ret;
 }
 
-const char *arch_vma_name(struct vm_area_struct *vma)
-{
-   if (vma-vm_start == VSYSCALL32_BASE 
-   vma-vm_mm  vma-vm_mm-task_size == IA32_PAGE_OFFSET)
-   return [vdso];
-   return NULL;
-}
-
 static int __init init_syscall32(void)
 { 
char *syscall32_page = (void *)get_zeroed_page(GFP_KERNEL);
-
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


Allow nodes to exist that only contain ZONE_MOVABLE

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5445f956ec3c8c19b760775e9ff92a160e3a167
Commit: b5445f956ec3c8c19b760775e9ff92a160e3a167
Parent: ee2077d97b2f392cfc0b884775ac58aa9b9b8c8f
Author: Mel Gorman [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 10:41:18 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:35:19 2007 -0700

Allow nodes to exist that only contain ZONE_MOVABLE

With the introduction of kernelcore=, a configurable zone is created on
request.  In some cases, this value will be small enough that some nodes
contain only ZONE_MOVABLE.  On some NUMA configurations when this occurs,
arch-independent zone-sizing will get the size of the memory holes within
the node incorrect.  The value of present_pages goes negative and the boot
fails.

This patch fixes the bug in the calculation of the size of the hole.  The
test case is to boot test a NUMA machine with a low value of kernelcore=
before and after the patch is applied.  While this bug exists in early
kernel it cannot be triggered in practice.

This patch has been boot-tested on a variety machines with and without
kernelcore= set.

Signed-off-by: Mel Gorman [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/page_alloc.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 40954fb..6d3550c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2775,11 +2775,11 @@ unsigned long __meminit __absent_pages_in_range(int nid,
if (i == -1)
return 0;
 
+   prev_end_pfn = min(early_node_map[i].start_pfn, range_end_pfn);
+
/* Account for ranges before physical memory on this node */
if (early_node_map[i].start_pfn  range_start_pfn)
-   hole_pages = early_node_map[i].start_pfn - range_start_pfn;
-
-   prev_end_pfn = early_node_map[i].start_pfn;
+   hole_pages = prev_end_pfn - range_start_pfn;
 
/* Find all holes for the zone within the node */
for (; i != -1; i = next_active_region_index_in_nid(i, nid)) {
-
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: use setup_irq() in 68328 timer code

2007-07-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=be03e56b777362a70f29399aaff9989fc3f3de63
Commit: be03e56b777362a70f29399aaff9989fc3f3de63
Parent: 5c4525da3b43ab194b99ea13142fa1f98fcba2fe
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 01:09:00 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jul 26 11:05:20 2007 -0700

m68knommu: use setup_irq() in 68328 timer code

Use setup_irq() instead of request_irq() to set up system timer
in 68328 timer code. With the old m68knommu irq code this
was safe, but it is not now within the generic irq framework.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/68328/timers.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/m68knommu/platform/68328/timers.c 
b/arch/m68knommu/platform/68328/timers.c
index ef067f4..0396476 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -18,10 +18,10 @@
 #include linux/kernel.h
 #include linux/mm.h
 #include linux/interrupt.h
+#include linux/irq.h
 #include asm/setup.h
 #include asm/system.h
 #include asm/pgtable.h
-#include asm/irq.h
 #include asm/machdep.h
 #include asm/MC68VZ328.h
 
@@ -53,14 +53,19 @@
 
 /***/
 
+static struct irqaction m68328_timer_irq = {
+   .name= timer,
+   .flags   = IRQF_DISABLED | IRQF_TIMER,
+};
+
 void m68328_timer_init(irq_handler_t timer_routine)
 {
/* disable timer 1 */
TCTL = 0;
 
/* set ISR */
-   if (request_irq(TMR_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, timer, 
NULL)) 
-   panic(Unable to attach timer interrupt\n);
+   m68328_timer_irq.handler = timer_routine;
+   setup_irq(TMR_IRQ_NUM, m68328_timer_irq);
 
/* Restart mode, Enable int, Set clock source */
TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE;
-
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