Re: [PATCH] i2c: tegra: Fix ifdefs for suspend mode

2012-08-18 Thread Wolfram Sang
On Mon, Jul 30, 2012 at 07:03:07PM +0530, Laxman Dewangan wrote:
> CONFIG_PM covers runtime only PM.

I am a bit confused by this description. CONFIG_PM_RUNTIME covers
runtime PM, no?

> 
> Signed-off-by: Laxman Dewangan 
> ---
> This patch will remove the compilation warning if CONFIG_PM_SLEEP
> is not enabled.

Maybe it would help to see the warning?

> 
>  drivers/i2c/busses/i2c-tegra.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 66eb53f..9a08c57 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -712,7 +712,7 @@ static int __devexit tegra_i2c_remove(struct 
> platform_device *pdev)
>   return 0;
>  }
>  
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
>  static int tegra_i2c_suspend(struct device *dev)
>  {
>   struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);
> -- 
> 1.7.1.1
> 

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH 3/8] ext3: remove lock/unlock super

2012-08-18 Thread Marco Stornelli

Il 18/08/2012 01:08, Theodore Ts'o ha scritto:

On Fri, Aug 17, 2012 at 08:47:04AM +0200, Marco Stornelli wrote:

Great. I'll remove the calls for ext3/ext4 when I'll submit the
second version of the patch.


FYI, I have the following patch my ext4 tree, so I could do more
intensive testing.  I'll let folks know if anything goes horribly
wrong, but I'm pretty sure this should be safe.


Yeah, I'm agree. It should be safe.



- Ted


From 81f74e743344217487792e4190f9478963d1bb21 Mon Sep 17 00:00:00 2001

From: Theodore Ts'o 
Date: Fri, 17 Aug 2012 19:00:34 -0400
Subject: [PATCH] ext4: drop lock_super()/unlock_super()

We don't need lock_super()/unlock_super() any more, since the places
where it is used, we are protected by the s_umount r/w semaphore.

Signed-off-by: "Theodore Ts'o" 
Cc: Marco Stornelli 
---


I think the patches will go via Al's tree so if Al is agree I'll submit 
the patches without modify ext4 at this point. Al, let me know if we 
want to proceed in a different way.


Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] perf ui/gtk: Ensure not to call gtk_main_quit() twice

2012-08-18 Thread Pekka Enberg
On Fri, Aug 17, 2012 at 7:56 PM, Namhyung Kim  wrote:
> Currently the gtk_main_quit() is called twice when perf exits so the
> following warning is emitted:
>
>   [penberg@tux perf]$ ./perf report --gtk
>   ^Cperf: Interrupt
>
>   (perf:4048): Gtk-CRITICAL **: IA__gtk_main_quit: assertion `main_loops != 
> NULL' failed
>
> Fix it by not to call it unnecessarily.
>
> Reported-by: Pekka Enberg 
> Signed-off-by: Namhyung Kim 
> ---
>  tools/perf/ui/gtk/setup.c |2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
> index ad40b3626fdb..ec1ee26b485a 100644
> --- a/tools/perf/ui/gtk/setup.c
> +++ b/tools/perf/ui/gtk/setup.c
> @@ -13,6 +13,8 @@ int perf_gtk__init(void)
>
>  void perf_gtk__exit(bool wait_for_ok __used)
>  {
> +   if (!perf_gtk__is_active_context(pgctx))
> +   return;
> perf_error__unregister(&perf_gtk_eops);
> gtk_main_quit();
>  }

Wouldn't it be nicer to rearrange the callers so that perf_gtk__exit()
is not called twice?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1 v4] i2c: Add default configuration into the Nomadik I2C driver.

2012-08-18 Thread Wolfram Sang
On Wed, Aug 08, 2012 at 02:11:59PM +0100, Lee Jones wrote:
> From: Lee Jones 
> Date: Tue, 7 Aug 2012 12:27:24 +0100
> Subject: [PATCH 1/1 v4] i2c/nomadik: Add default configuration into the 
> Nomadik I2C driver

Actually, unlike Linus said, I prefer "i2c: nomadik:"; minor nit,
though.

> 
> At this moment in time there is only one known configuration for the
> Nomadik I2C driver. By not holding that configuration in the driver
> adds some unnecessary overhead in platform code. The configuration
> as already been removed from platform code, this patch checks for any

  ^^ has ( I fixed it )

> over-riding configurations. If there aren't any, the default is used.
> 
> Cc: linux-...@vger.kernel.org
> Acked-by: srinidhi kasagar 
> Acked-by: Linus Walleij 
> Signed-off-by: Lee Jones 

Applied to -current, thanks! I added a note from Linus that it is needed
because of boot regressions. That is also useful in commit messages.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


[PATCH] Extcon: Minor change in the declaration of cable_names

2012-08-18 Thread anish kumar
From: anish kumar 

Instead of "const char **supported_cable" it is better to have
it as "const char *const *supported_cable".

Signed-off-by: anish kumar 
---
 include/linux/extcon.h |2 +-
 include/linux/extcon/extcon-adc-jack.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index cdd4014..a6bcc29 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -111,7 +111,7 @@ struct extcon_cable;
 struct extcon_dev {
/* --- Optional user initializing data --- */
const char  *name;
-   const char **supported_cable;
+   const char *const *supported_cable;
const u32   *mutually_exclusive;
 
/* --- Optional callbacks to override class functions --- */
diff --git a/include/linux/extcon/extcon-adc-jack.h 
b/include/linux/extcon/extcon-adc-jack.h
index 20e9eef..f27f2e8 100644
--- a/include/linux/extcon/extcon-adc-jack.h
+++ b/include/linux/extcon/extcon-adc-jack.h
@@ -60,7 +60,7 @@ struct adc_jack_pdata {
/*
 * The last entry should be NULL
 */
-   const char **cable_names;
+   const char *const *cable_names;
/* The last entry's state should be 0 */
struct adc_jack_cond *adc_conditions;
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 00/11] x86/microcode: Early load microcode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on.  This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early as at all possible.

Similarly, we should load the microcode update as early as possible during AP
bringup and when processors are brought back online after hotplug or S3/S4.

In order to do that, the microcode patch needs to be permanently present in
kernel memory.  Each individual patch is fairly small, so that is OK, but the
entire blob with support for each CPU is too big. Since only CPU's with same
model can be in the same platform, we store microcode with the same model as
BSP. Later on AP's can upload microcode from the saved microcodep patches.

Note, however, that Linux users have gotten used to being able to install a
microcode patch in the field without having a reboot; we support that model too.

Fenghua Yu (11):
  Documentation/x86: Early load microcode
  x86/lib/cpio.c: Find cpio data by its file name
  x86/microcode_intel.h: Define functions and macros for early load
ucode
  x86/microcode_core_early.c: Define interfaces for early load ucode
  x86/microcode_intel_lib.c: Early update ucode on Intel's CPU
  x86/microcode_intel_early.c: Early update ucode on Intel's CPU
  x86/head_32.S: Early update ucode in 32-bit
  x86/head64.c: Early update ucode in 64-bit
  x86/smpboot.c: Early update ucode on AP
  x86/mm/init.c: Copy ucode from initrd image to memory
  x86/Kconfig: Configurations to enable/disable the feature

 Documentation/x86/earlyucode.txt|   43 +++
 arch/x86/Kconfig|   22 ++
 arch/x86/include/asm/cpio.h |   10 +
 arch/x86/include/asm/microcode.h|   23 ++
 arch/x86/include/asm/microcode_intel.h  |  103 +++
 arch/x86/kernel/Makefile|3 +
 arch/x86/kernel/head64.c|6 +
 arch/x86/kernel/head_32.S   |6 +
 arch/x86/kernel/microcode_core.c|7 +-
 arch/x86/kernel/microcode_core_early.c  |   74 +
 arch/x86/kernel/microcode_intel.c   |  185 +
 arch/x86/kernel/microcode_intel_early.c |  482 +++
 arch/x86/kernel/microcode_intel_lib.c   |  163 +++
 arch/x86/kernel/smpboot.c   |7 +
 arch/x86/lib/Makefile   |2 +
 arch/x86/lib/cpio.c |  179 
 arch/x86/mm/init.c  |   10 +
 17 files changed, 1144 insertions(+), 181 deletions(-)
 create mode 100644 Documentation/x86/earlyucode.txt
 create mode 100644 arch/x86/include/asm/cpio.h
 create mode 100644 arch/x86/include/asm/microcode_intel.h
 create mode 100644 arch/x86/kernel/microcode_core_early.c
 create mode 100644 arch/x86/kernel/microcode_intel_early.c
 create mode 100644 arch/x86/kernel/microcode_intel_lib.c
 create mode 100644 arch/x86/lib/cpio.c

-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 03/11] x86/microcode_intel.h: Define functions and macros for early load ucode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Define some functions and macros that will be used in early load ucode. Some of
them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.

Signed-off-by: Fenghua Yu 
---
 arch/x86/include/asm/microcode_intel.h |  103 ++
 arch/x86/kernel/Makefile   |3 +
 arch/x86/kernel/microcode_core.c   |7 +-
 arch/x86/kernel/microcode_intel.c  |  185 ++--
 4 files changed, 117 insertions(+), 181 deletions(-)
 create mode 100644 arch/x86/include/asm/microcode_intel.h

diff --git a/arch/x86/include/asm/microcode_intel.h 
b/arch/x86/include/asm/microcode_intel.h
new file mode 100644
index 000..392d893
--- /dev/null
+++ b/arch/x86/include/asm/microcode_intel.h
@@ -0,0 +1,103 @@
+#ifndef _ASM_X86_MICROCODE_INTEL_H
+#define _ASM_X86_MICROCODE_INTEL_H
+
+#include 
+
+struct microcode_header_intel {
+   unsigned inthdrver;
+   unsigned intrev;
+   unsigned intdate;
+   unsigned intsig;
+   unsigned intcksum;
+   unsigned intldrver;
+   unsigned intpf;
+   unsigned intdatasize;
+   unsigned inttotalsize;
+   unsigned intreserved[3];
+};
+
+struct microcode_intel {
+   struct microcode_header_intel hdr;
+   unsigned intbits[0];
+};
+
+/* microcode format is extended from prescott processors */
+struct extended_signature {
+   unsigned intsig;
+   unsigned intpf;
+   unsigned intcksum;
+};
+
+struct extended_sigtable {
+   unsigned intcount;
+   unsigned intcksum;
+   unsigned intreserved[3];
+   struct extended_signature sigs[0];
+};
+
+#define DEFAULT_UCODE_DATASIZE (2000)
+#define MC_HEADER_SIZE (sizeof(struct microcode_header_intel))
+#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
+#define EXT_HEADER_SIZE(sizeof(struct extended_sigtable))
+#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))
+#define DWSIZE (sizeof(u32))
+
+#define get_totalsize(mc) \
+   (((struct microcode_intel *)mc)->hdr.totalsize ? \
+((struct microcode_intel *)mc)->hdr.totalsize : \
+DEFAULT_UCODE_TOTALSIZE)
+
+#define get_datasize(mc) \
+   (((struct microcode_intel *)mc)->hdr.datasize ? \
+((struct microcode_intel *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
+
+#define sigmatch(s1, s2, p1, p2) \
+   (((s1) == (s2)) && (((p1) & (p2)) || (((p1) == 0) && ((p2) == 0
+
+#define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
+
+extern int
+get_matching_microcode(unsigned int csig, int cpf, void *mc, int rev);
+extern int microcode_sanity_check(void *mc, int print_err);
+
+#ifdef CONFIG_MICROCODE_INTEL_EARLY
+extern enum ucode_state
+get_matching_model_microcode(int cpu, void *data, size_t size,
+struct mc_saved_data *mc_saved_data,
+struct microcode_intel **mc_saved_in_initrd,
+enum system_states system_state);
+extern enum ucode_state
+generic_load_microcode_early(int cpu, struct microcode_intel **mc_saved_p,
+unsigned int mc_saved_count,
+struct ucode_cpu_info *uci);
+extern void __init
+load_ucode_intel_bsp(char *real_mode_data);
+extern void __init load_ucode_intel_ap(void);
+#else
+static inline enum ucode_state
+get_matching_model_microcode(int cpu, void *data, size_t size,
+struct mc_saved_data *mc_saved_data,
+struct microcode_intel **mc_saved_in_initrd,
+enum system_states system_state)
+{
+   return UCODE_ERROR;
+}
+enum ucode_state
+generic_load_microcode_early(int cpu, struct microcode_intel **mc_saved_p,
+unsigned int mc_saved_count,
+struct ucode_cpu_info *uci)
+{
+   return UCODE_ERROR;
+}
+void __init
+load_ucode_intel_bsp(char *real_mode_data)
+{
+}
+__init void
+load_ucode_intel_ap(struct ucode_cpu_info *uci,
+   struct mc_saved_data *mc_saved_data)
+{
+}
+#endif
+
+#endif /* _ASM_X86_MICROCODE_INTEL_H */
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 8215e56..cd67adf 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -89,6 +89,9 @@ obj-$(CONFIG_PARAVIRT_CLOCK)  += pvclock.o
 
 obj-$(CONFIG_PCSPKR_PLATFORM)  += pcspeaker.o
 
+obj-$(CONFIG_MICROCODE_EARLY)  += microcode_core_early.o
+obj-$(CONFIG_MICROCODE_INTEL_EARLY)+= microcode_intel_early.o
+obj-$(CONFIG_MICROCODE_INTEL_LIB)  += microcode_intel_lib.o
 microcode-y:= microcode_core.o
 microcode-$(CONFIG_MICROCODE_INTEL)+= microcode_i

[PATCH 09/11] x86/smpboot.c: Early update ucode on AP

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

This updates ucode on AP. At this point, BSP should store some valid ucode
patches in memory if it finds the ucode patches in initrd. AP searches the
stored ucode and uploads the ucode.

Signed-off-by: Fenghua Yu 
---
 arch/x86/kernel/smpboot.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 7c5a8c3..c72e230 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -76,6 +76,7 @@
 #include 
 
 #include 
+#include 
 
 /* State of each CPU */
 DEFINE_PER_CPU(int, cpu_state) = { 0 };
@@ -239,6 +240,12 @@ notrace static void __cpuinit start_secondary(void *unused)
 * most necessary things.
 */
cpu_init();
+   /*
+* Load microcode on this cpu if a valid microcode is available.
+* This is early microcode loading procedure.
+*/
+   load_ucode_ap();
+
x86_cpuinit.early_percpu_clock_init();
preempt_disable();
smp_callin();
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/11] x86/mm/init.c: Copy ucode from initrd image to memory

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Before initrd image is freed, copy valid ucode patches from initrd image
to kernel virtual memory. The saved ucode will be used to update AP in resume.

Signed-off-by: Fenghua Yu 
---
 arch/x86/mm/init.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index e0e6990..58ceb82 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include/* for MAX_DMA_PFN */
+#include 
 
 unsigned long __initdata pgt_buf_start;
 unsigned long __meminitdata pgt_buf_end;
@@ -387,6 +388,15 @@ void free_initmem(void)
 #ifdef CONFIG_BLK_DEV_INITRD
 void __init free_initrd_mem(unsigned long start, unsigned long end)
 {
+#ifdef CONFIG_MICROCODE_EARLY
+   /*
+* Remember, initrd memory may contain microcode or other useful things.
+* Before we lose initrd mem, we need to find a place to hold them
+* now that normal virtual memory is enabled.
+*/
+   save_microcode_in_initrd(&mc_saved_data, mc_saved_in_initrd);
+#endif
+
/*
 * end could be not aligned, and We can not align that,
 * decompresser could be confused by aligned initrd_end
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/11] x86/Kconfig: Configurations to enable/disable the feature

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.

Signed-off-by: Fenghua Yu 
---
 arch/x86/Kconfig |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 50c660d..32caa77 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1035,6 +1035,7 @@ config MICROCODE_INTEL
depends on MICROCODE
default MICROCODE
select FW_LOADER
+   select MICROCODE_INTEL_LIB
---help---
  This options enables microcode patch loading support for Intel
  processors.
@@ -1055,6 +1056,27 @@ config MICROCODE_OLD_INTERFACE
def_bool y
depends on MICROCODE
 
+config MICROCODE_EARLY
+   def_bool y
+   depends on MICROCODE_INTEL_EARLY
+
+config MICROCODE_INTEL_LIB
+   def_bool y
+   depends on MICROCODE_INTEL_EARLY
+
+config MICROCODE_INTEL_EARLY
+   bool "Early load microcode"
+   depends on MICROCODE_INTEL && BLK_DEV_INITRD
+   default y
+   select FW_LOADER
+   select MICROCODE_EARLY
+   select MICROCODE_INTEL_LIB
+   help
+ This option provides functionality to read additional microcode data
+ at the beginning of initrd image. The data tells kernel to load
+ microcode to CPU's as early as possible. No functional change if no
+ microcode data is glued to the initrd, therefore it's safe to say Y.
+
 config X86_MSR
tristate "/dev/cpu/*/msr - Model-specific register support"
---help---
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/11] Documentation/x86: Early load microcode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Documenation for early load microcode methodology.

Signed-off-by: Fenghua Yu 
---
 Documentation/x86/earlyucode.txt |   43 ++
 1 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/x86/earlyucode.txt

diff --git a/Documentation/x86/earlyucode.txt b/Documentation/x86/earlyucode.txt
new file mode 100644
index 000..d8966d6
--- /dev/null
+++ b/Documentation/x86/earlyucode.txt
@@ -0,0 +1,43 @@
+Early load microcode
+
+By Fenghua Yu 
+
+Kernel can update microcode in early phase of boot time. Loading microcode 
early
+can fix CPU issues before they are observed during kernel boot time.
+
+Microcode is stored in initrd file. The microcode is read from the initrd file
+and loaded to CPU's during boot time.
+
+The format of the combined initrd image is microcode in cpio format followed by
+initrd image (maybe compressed). Kernel parses the combined initrd image during
+boot time. The microcode file in cpio name space is:
+kernel/x86/microcode/GenuineIntel/microcode.hex
+
+During BSP boot (before SMP starts), if kernel finds the microcode file in the
+initrd file, it parses the microcode and saves matching microcode in memory.
+If matching microcode is found, it will be uploaded in BSP and later on in all
+AP's.
+
+The saved microcode in memory will be used to upload micorcode when system
+resumes from sleep.
+
+In the past, user can issue command to load microcode during run time. There 
are
+two user space interfaces to load microcode, either through /dev/cpu/microcode
+interface or through reload file in sysfs.
+
+Now user can choose any of the three methods to update microcode during boot
+time or later during run time.
+
+The following sample script shows how to generate a new combined initrd file in
+/boot/initrd-3.5.0.ucode.img with original microcode microcode.hex and
+original initrd image /boot/initrd-3.5.0.img.
+
+mkdir initrd
+cd initrd
+cp ../microcode.hex kernel/x86/microcode/GenuineIntel/microcode.hex
+find .|cpio -oc >../ucode.cpio
+cd ..
+cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img
+
+The generated /boot/initrd-3.5.0.ucode.img can be used as initrd file to load
+microcode during early boot time.
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 02/11] x86/lib/cpio.c: Find cpio data by its file name

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Given a file's name, find its starting point in a cpio formated area. This will
be used to find microcode in combined initrd image. But this function is
generic and could be used in other places.

Signed-off-by: Fenghua Yu 
---
 arch/x86/include/asm/cpio.h |   10 +++
 arch/x86/lib/Makefile   |2 +
 arch/x86/lib/cpio.c |  179 +++
 3 files changed, 191 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/include/asm/cpio.h
 create mode 100644 arch/x86/lib/cpio.c

diff --git a/arch/x86/include/asm/cpio.h b/arch/x86/include/asm/cpio.h
new file mode 100644
index 000..26a4333
--- /dev/null
+++ b/arch/x86/include/asm/cpio.h
@@ -0,0 +1,10 @@
+#include 
+#include 
+
+struct cpio_data {
+   void *data;
+   unsigned long size;
+};
+
+extern struct cpio_data
+find_cpio_data(const char *name, const void *data, size_t len);
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index b00f678..452a4b5 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -45,3 +45,5 @@ else
 lib-y += copy_user_64.o copy_user_nocache_64.o
lib-y += cmpxchg16b_emu.o
 endif
+
+obj-y += cpio.o
diff --git a/arch/x86/lib/cpio.c b/arch/x86/lib/cpio.c
new file mode 100644
index 000..70ac474
--- /dev/null
+++ b/arch/x86/lib/cpio.c
@@ -0,0 +1,179 @@
+/*
+ * findcpio.c
+ *
+ * Find a specific cpio member; must precede any compressed content.
+ *
+ * Copyright (C) 2012  H Peter Anvin" 
+ * Fenghua Yu 
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+enum cpio_fields {
+   C_MAGIC,
+   C_INO,
+   C_MODE,
+   C_UID,
+   C_GID,
+   C_NLINK,
+   C_MTIME,
+   C_FILESIZE,
+   C_MAJ,
+   C_MIN,
+   C_RMAJ,
+   C_RMIN,
+   C_NAMESIZE,
+   C_CHKSUM,
+   C_NFIELDS
+};
+
+#if defined(__i386__) || defined(__x86_64__)
+static size_t cpio_strlen(const char *name)
+{
+   size_t n = -1;
+
+   asm("repne; scasb"
+   : "+D" (name), "+c" (n)
+   : "a" (0));
+
+   return -2 - n;
+}
+
+static int cpio_memcmp(const void *p1, const void *p2, size_t n)
+{
+   unsigned char rv;
+
+   asm("repe; cmpsb; setne %0"
+   : "=r" (rv), "+S" (p1), "+D" (p2), "+c" (n));
+
+   return rv;
+}
+#else
+static size_t cpio_strlen(const char *name)
+{
+   size_t n = 0;
+
+   while (*name++)
+   n++;
+
+   return n;
+}
+
+static int cpio_memcmp(const void *p1, const void *p2, size_t n)
+{
+   const unsigned char *u1 = p1;
+   const unsigned char *u2 = p2;
+   int d;
+
+   while (n--) {
+   d = *u2++ - *u1++;
+   if (d)
+   return d;
+   }
+   return 0;
+}
+#endif
+
+#define ALIGN4(p) ((void *)(((size_t)p + 3) & ~3))
+
+struct cpio_data find_cpio_data(const char *name, const void *data, size_t len)
+{
+   const size_t cpio_header_len = 8*C_NFIELDS - 2;
+   struct cpio_data cd = { NULL, 0 };
+   const char *p, *dptr, *nptr;
+   unsigned int ch[C_NFIELDS], *chp, v;
+   unsigned char c, x;
+   size_t mynamesize = cpio_strlen(name) + 1;
+   int i, j;
+
+   p = data;
+
+   while (len > cpio_header_len) {
+   if (!*p) {
+   /* All cpio headers need to be 4-byte aligned */
+   p += 4;
+   len -= 4;
+   continue;
+   }
+
+   j = 6;  /* The magic field is only 6 characters */
+   chp = ch;
+   for (i = C_NFIELDS; i; i--) {
+   v = 0;
+   while (j--) {
+   v <<= 4;
+   c = *p++;
+
+   x = c - '0';
+   if (x < 10) {
+   v += x;
+   continue;
+   }
+
+   x = (c | 0x20) - 'a';
+   if (x < 6) {
+   v += x + 10;
+   continue;
+   }
+
+   goto quit; /* Invalid hexadecimal */
+   }
+   *chp++ = v;
+   j = 8;  /* All other fields are 8 characters */
+   }
+
+   if ((ch[C_MAGIC] - 0x070701) > 1)
+   goto quit; /* Invalid magic */
+
+   len -= cpio_header_len;
+
+   dptr = ALIGN4(p + ch[C_NAMESIZE]);
+   nptr = ALIGN4

[PATCH 06/11] x86/microcode_intel_early.c: Early update ucode on Intel's CPU

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Implementation of early update ucode on Intel's CPU.

load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel/microcode.hex in the cpio data. All ucode
patches with the same model as BSP are saved in memory. A matching ucode patch
is updated on BSP.

load_ucode_intel_ap() reads saved ucoded patches and updates ucode on AP.

Signed-off-by: Fenghua Yu 
---
 arch/x86/kernel/microcode_intel_early.c |  482 +++
 1 files changed, 482 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/kernel/microcode_intel_early.c

diff --git a/arch/x86/kernel/microcode_intel_early.c 
b/arch/x86/kernel/microcode_intel_early.c
new file mode 100644
index 000..cb3f066
--- /dev/null
+++ b/arch/x86/kernel/microcode_intel_early.c
@@ -0,0 +1,482 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
+ *
+ * Copyright (C) 2012 Fenghua Yu 
+ *H Peter Anvin" 
+ *
+ * This driver allows to early upgrade microcode on Intel processors
+ * belonging to IA-32 family - PentiumPro, Pentium II,
+ * Pentium III, Xeon, Pentium 4, etc.
+ *
+ * Reference: Section 9.11 of Volume 3, IA-32 Intel Architecture
+ * Software Developer's Manual.
+ *
+ * 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 the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct microcode_intel __initdata *mc_saved_in_initrd[MAX_UCODE_COUNT];
+struct mc_saved_data mc_saved_data;
+
+static inline int
+update_match_cpu(unsigned int csig, unsigned int cpf,
+unsigned int sig, unsigned int pf)
+{
+   return (!sigmatch(sig, csig, pf, cpf)) ? 0 : 1;
+}
+
+static inline int
+update_match_revision(struct microcode_header_intel *mc_header, int rev)
+{
+   return (mc_header->rev <= rev) ? 0 : 1;
+}
+
+/*
+ * return 0 - no update found
+ * return 1 - found update
+ */
+static int
+get_matching_sig(unsigned int csig, int cpf, void *mc, int rev)
+{
+   struct microcode_header_intel *mc_header = mc;
+   struct extended_sigtable *ext_header;
+   unsigned long total_size = get_totalsize(mc_header);
+   int ext_sigcount, i;
+   struct extended_signature *ext_sig;
+
+   if (update_match_cpu(csig, cpf, mc_header->sig, mc_header->pf))
+   return 1;
+
+   /* Look for ext. headers: */
+   if (total_size <= get_datasize(mc_header) + MC_HEADER_SIZE)
+   return 0;
+
+   ext_header = mc + get_datasize(mc_header) + MC_HEADER_SIZE;
+   ext_sigcount = ext_header->count;
+   ext_sig = (void *)ext_header + EXT_HEADER_SIZE;
+
+   for (i = 0; i < ext_sigcount; i++) {
+   if (update_match_cpu(csig, cpf, ext_sig->sig, ext_sig->pf))
+   return 1;
+   ext_sig++;
+   }
+   return 0;
+}
+
+enum ucode_state
+generic_load_microcode_early(int cpu, struct microcode_intel **mc_saved_p,
+unsigned int mc_saved_count,
+struct ucode_cpu_info *uci)
+{
+   struct microcode_intel *ucode_ptr, *new_mc = NULL;
+   int new_rev = uci->cpu_sig.rev;
+   enum ucode_state state = UCODE_OK;
+   unsigned int mc_size;
+   struct microcode_header_intel *mc_header;
+   unsigned int csig = uci->cpu_sig.sig;
+   unsigned int cpf = uci->cpu_sig.pf;
+   int i;
+
+   for (i = 0; i < mc_saved_count; i++) {
+   ucode_ptr = mc_saved_p[i];
+   mc_header = (struct microcode_header_intel *)ucode_ptr;
+   mc_size = get_totalsize(mc_header);
+   if (get_matching_microcode(csig, cpf, ucode_ptr, new_rev)) {
+   new_rev = mc_header->rev;
+   new_mc  = ucode_ptr;
+   }
+   }
+
+   if (!new_mc) {
+   state = UCODE_NFOUND;
+   goto out;
+   }
+
+   uci->mc = (struct microcode_intel *)new_mc;
+out:
+   return state;
+}
+EXPORT_SYMBOL_GPL(generic_load_microcode_early);
+
+static enum ucode_state __init
+load_microcode(struct mc_saved_data *mc_saved_data, int cpu)
+{
+   struct ucode_cpu_info *uci = mc_saved_data->ucode_cpu_info + cpu;
+
+   return generic_load_microcode_early(cpu, mc_saved_data->mc_saved,
+   mc_saved_data->mc_saved_count, uci);
+}
+
+static u8 get_x86_family(unsigned long sig)
+{
+   u8 x86;
+
+   x86 = (sig >> 8) & 0xf;
+
+   if (x86 == 0xf)
+   x86 += (sig >> 20) & 0xff;
+
+   return x86;
+}
+
+static u8 get_x86_model(unsigned long sig)
+{
+   u8 x86, x86_model;
+
+   x86 = get_x86_family(sig);

[PATCH 08/11] x86/head64.c: Early update ucode in 64-bit

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

This updates ucode in 64-bit mode. Paging and virtual address are working now.

Signed-off-by: Fenghua Yu 
---
 arch/x86/kernel/head64.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 037df57..a512f56 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void __init zap_identity_mappings(void)
 {
@@ -73,6 +74,11 @@ void __init x86_64_start_kernel(char * real_mode_data)
/* clear bss before set_intr_gate with early_idt_handler */
clear_bss();
 
+   /*
+* Load microcode early on BSP.
+*/
+   load_ucode_bsp(real_mode_data);
+
/* Make NULL pointers segfault */
zap_identity_mappings();
 
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 05/11] x86/microcode_intel_lib.c: Early update ucode on Intel's CPU

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.

Signed-off-by: Fenghua Yu 
---
 arch/x86/kernel/microcode_intel_lib.c |  163 +
 1 files changed, 163 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/kernel/microcode_intel_lib.c

diff --git a/arch/x86/kernel/microcode_intel_lib.c 
b/arch/x86/kernel/microcode_intel_lib.c
new file mode 100644
index 000..66550b3
--- /dev/null
+++ b/arch/x86/kernel/microcode_intel_lib.c
@@ -0,0 +1,163 @@
+/*
+ * Intel CPU Microcode Update Driver for Linux
+ *
+ * Copyright (C) 2012 Fenghua Yu 
+ *H Peter Anvin" 
+ *
+ * This driver allows to upgrade microcode on Intel processors
+ * belonging to IA-32 family - PentiumPro, Pentium II,
+ * Pentium III, Xeon, Pentium 4, etc.
+ *
+ * Reference: Section 8.11 of Volume 3a, IA-32 Intel? Architecture
+ * Software Developer's Manual
+ * Order Number 253668 or free download from:
+ *
+ * http://developer.intel.com/Assets/PDF/manual/253668.pdf
+ *
+ * For more information, go to http://www.urbanmyth.org/microcode
+ *
+ * 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 the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+static inline int
+update_match_cpu(unsigned int csig, unsigned int cpf,
+unsigned int sig, unsigned int pf)
+{
+   return (!sigmatch(sig, csig, pf, cpf)) ? 0 : 1;
+}
+
+static inline int
+update_match_revision(struct microcode_header_intel *mc_header, int rev)
+{
+   return (mc_header->rev <= rev) ? 0 : 1;
+}
+
+int microcode_sanity_check(void *mc, int print_err)
+{
+   unsigned long total_size, data_size, ext_table_size;
+   struct microcode_header_intel *mc_header = mc;
+   struct extended_sigtable *ext_header = NULL;
+   int sum, orig_sum, ext_sigcount = 0, i;
+   struct extended_signature *ext_sig;
+
+   total_size = get_totalsize(mc_header);
+   data_size = get_datasize(mc_header);
+
+   if (data_size + MC_HEADER_SIZE > total_size) {
+   if (print_err)
+   pr_err("error! Bad data size in microcode data file\n");
+   return -EINVAL;
+   }
+
+   if (mc_header->ldrver != 1 || mc_header->hdrver != 1) {
+   if (print_err)
+   pr_err("error! Unknown microcode update format\n");
+   return -EINVAL;
+   }
+   ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
+   if (ext_table_size) {
+   if ((ext_table_size < EXT_HEADER_SIZE)
+|| ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) {
+   if (print_err)
+   pr_err("error! Small exttable size in microcode 
data file\n");
+   return -EINVAL;
+   }
+   ext_header = mc + MC_HEADER_SIZE + data_size;
+   if (ext_table_size != exttable_size(ext_header)) {
+   if (print_err)
+   pr_err("error! Bad exttable size in microcode 
data file\n");
+   return -EFAULT;
+   }
+   ext_sigcount = ext_header->count;
+   }
+
+   /* check extended table checksum */
+   if (ext_table_size) {
+   int ext_table_sum = 0;
+   int *ext_tablep = (int *)ext_header;
+
+   i = ext_table_size / DWSIZE;
+   while (i--)
+   ext_table_sum += ext_tablep[i];
+   if (ext_table_sum) {
+   if (print_err)
+   pr_warn("aborting, bad extended signature table 
checksum\n");
+   return -EINVAL;
+   }
+   }
+
+   /* calculate the checksum */
+   orig_sum = 0;
+   i = (MC_HEADER_SIZE + data_size) / DWSIZE;
+   while (i--)
+   orig_sum += ((int *)mc)[i];
+   if (orig_sum) {
+   if (print_err)
+   pr_err("aborting, bad checksum\n");
+   return -EINVAL;
+   }
+   if (!ext_table_size)
+   return 0;
+   /* check extended signature checksum */
+   for (i = 0; i < ext_sigcount; i++) {
+   ext_sig = (void *)ext_header + EXT_HEADER_SIZE +
+ EXT_SIGNATURE_SIZE * i;
+   sum = orig_sum
+   - (mc_header->sig + mc_header->pf + mc_header->cksum)
+   + (ext_sig->sig + ext_sig->pf + ext_sig->cksum);
+   if (sum) {
+   if (print_err)
+   pr_err("abortin

[PATCH 04/11] x86/microcode_core_early.c: Define interfaces for early load ucode

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.

Signed-off-by: Fenghua Yu 
---
 arch/x86/include/asm/microcode.h   |   23 ++
 arch/x86/kernel/microcode_core_early.c |   74 
 2 files changed, 97 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/kernel/microcode_core_early.c

diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
index 4ebe157..080ea77 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -63,4 +63,27 @@ static inline struct microcode_ops * __init 
init_amd_microcode(void)
 static inline void __exit exit_amd_microcode(void) {}
 #endif
 
+struct mc_saved_data {
+   unsigned int mc_saved_count;
+   struct microcode_intel **mc_saved;
+   struct ucode_cpu_info *ucode_cpu_info;
+};
+#ifdef CONFIG_MICROCODE_EARLY
+#define MAX_UCODE_COUNT 128
+extern struct ucode_cpu_info ucode_cpu_info_early[NR_CPUS];
+extern struct microcode_intel __initdata *mc_saved_in_initrd[MAX_UCODE_COUNT];
+extern struct mc_saved_data mc_saved_data;
+extern void __init load_ucode_bsp(char *real_mode_data);
+extern __init void load_ucode_ap(void);
+extern void __init
+save_microcode_in_initrd(struct mc_saved_data *mc_saved_data,
+struct microcode_intel **mc_saved_in_initrd);
+#else
+static inline void __init load_ucode_bsp(char *real_mode_data) {}
+static inline __init void load_ucode_ap(void) {}
+static inline void __init
+save_microcode_in_initrd(struct mc_saved_data *mc_saved_data,
+struct microcode_intel **mc_saved_in_initrd) {}
+#endif
+
 #endif /* _ASM_X86_MICROCODE_H */
diff --git a/arch/x86/kernel/microcode_core_early.c 
b/arch/x86/kernel/microcode_core_early.c
new file mode 100644
index 000..5bcc6f8
--- /dev/null
+++ b/arch/x86/kernel/microcode_core_early.c
@@ -0,0 +1,74 @@
+/*
+ * X86 CPU microcode early update for Linux
+ *
+ * Copyright (C) 2012 Fenghua Yu 
+ *H Peter Anvin" 
+ *
+ * This driver allows to early upgrade microcode on Intel processors
+ * belonging to IA-32 family - PentiumPro, Pentium II,
+ * Pentium III, Xeon, Pentium 4, etc.
+ *
+ * Reference: Section 9.11 of Volume 3, IA-32 Intel Architecture
+ * Software Developer's Manual.
+ *
+ * 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 the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct ucode_cpu_info  ucode_cpu_info_early[NR_CPUS];
+EXPORT_SYMBOL_GPL(ucode_cpu_info_early);
+
+static __init enum ucode_state
+find_ucode_intel(unsigned long start, unsigned long end)
+{
+   unsigned int size = end - start + 1;
+   struct cpio_data cd = { 0, 0 };
+   char ucode_name[] = "kernel/x86/microcode/GenuineIntel/microcode.hex";
+
+   cd = find_cpio_data(ucode_name, (void *)start, size);
+   if (cd.data)
+   return UCODE_OK;
+
+   return UCODE_ERROR;
+}
+
+void __init load_ucode_bsp(char *real_mode_data)
+{
+   u64 ramdisk_image, ramdisk_size, ramdisk_end;
+   unsigned long initrd_start, initrd_end;
+   struct boot_params *boot_params;
+
+   boot_params = (struct boot_params *)real_mode_data;
+   ramdisk_image = boot_params->hdr.ramdisk_image;
+   ramdisk_size  = boot_params->hdr.ramdisk_size;
+
+#ifdef CONFIG_X86_64
+   ramdisk_end  = PAGE_ALIGN(ramdisk_image + ramdisk_size);
+   initrd_start = ramdisk_image + PAGE_OFFSET;
+#else
+   ramdisk_end  = ramdisk_image + ramdisk_size;
+   initrd_start = ramdisk_image;
+#endif
+   initrd_end = initrd_start + ramdisk_size;
+
+   /*
+* It's early to get CPU vendor info at this point.
+* By searching initrd to find right name for vendor's microcode,
+* it's relative easier to get CPU vendor info.
+*/
+   if (find_ucode_intel(initrd_start, initrd_end) == UCODE_OK)
+   load_ucode_intel_bsp(real_mode_data);
+}
+
+void __cpuinit load_ucode_ap(void)
+{
+   if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
+   load_ucode_intel_ap();
+}
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/11] x86/head_32.S: Early update ucode in 32-bit

2012-08-18 Thread Fenghua Yu
From: Fenghua Yu 

This updates ucode in 32-bit kernel. At this point, there is no paging and no
virtual address yet.

Signed-off-by: Fenghua Yu 
---
 arch/x86/kernel/head_32.S |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index d42ab17..bb0d1e5 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -144,6 +144,12 @@ ENTRY(startup_32)
movl %eax, pa(olpc_ofw_pgd)
 #endif
 
+#ifdef CONFIG_MICROCODE_EARLY
+   /* Early load ucode on BSP. */
+   movl $pa(boot_params), %eax
+   call load_ucode_bsp
+#endif
+
 /*
  * Initialize page tables.  This creates a PDE and a set of page
  * tables, which are located immediately beyond __brk_base.  The variable
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch] [SCSI] bnx2fc: zero out sense buffer properly

2012-08-18 Thread Dan Carpenter
->sense_buffer used to be an array but it changed to pointer in
de25deb180 "[SCSI] use dynamically allocated sense buffer".  This call
to memset() needs to be updated as well.

Signed-off-by: Dan Carpenter 

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 73f231c..8d4626c 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1807,7 +1807,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd 
*io_req,
fcp_sns_len = SCSI_SENSE_BUFFERSIZE;
}
 
-   memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
+   memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
if (fcp_sns_len)
memcpy(sc_cmd->sense_buffer, rq_data, fcp_sns_len);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch] [SCSI] bnx2fc: zero out sense buffer properly

2012-08-18 Thread FUJITA Tomonori
On Sat, 18 Aug 2012 11:46:37 +0300
Dan Carpenter  wrote:

> ->sense_buffer used to be an array but it changed to pointer in
> de25deb180 "[SCSI] use dynamically allocated sense buffer".  This call
> to memset() needs to be updated as well.
> 
> Signed-off-by: Dan Carpenter 
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 73f231c..8d4626c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1807,7 +1807,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd 
> *io_req,
>   fcp_sns_len = SCSI_SENSE_BUFFERSIZE;
>   }
>  
> - memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
> + memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);

I guess that you can remove the line instead. IIRC, scsi-ml does it
for LLDs.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/4] fat: fix ESTALE errors

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

This patch-set eliminates the client side ESTALE errors when
a FAT partition exported over NFS has its dentries evicted 
from the cache.

One of the reasons for this error is lack of permanent inode 
numbers on FAT which makes it difficult to construct persistent 
file handles.This can be overcome by using the on-disk location
of the directory entries (i_pos) as the inode number.

Once the i_pos is available, it is only a matter of reading the
directory entries from the disk clusters to locate the matching
entry and rebuild the corresponding inode.

Namjae Jeon (4):
  fat: allocate persistent inode numbers
  fat (exportfs): rebuild inode if ilookup() fails
  fat (exportfs): rebuild directory-inode if fat_dget() fails
  Documentation: update nfs option in filesystem/vfat.txt
---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/4] fat (exportfs): rebuild inode if ilookup() fails

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

Since the previous patch in this patch-set uses i_pos as the inode
number, we can use it to find the directory entry of the inode and
subsequently rebuild the inode if the cache lookups fail.

Since this involves  accessing the FAT media,it is better to do this
only if the 'nfs' mount option is enabled.

Signed-off-by: Namjae Jeon 
Signed-off-by: Ravishankar N 
Signed-off-by: Amit Sahrawat 
---
 fs/fat/nfs.c |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/fs/fat/nfs.c b/fs/fat/nfs.c
index ef4b5fa..44678e4 100644
--- a/fs/fat/nfs.c
+++ b/fs/fat/nfs.c
@@ -52,6 +52,24 @@ static struct inode *fat_nfs_get_inode(struct super_block 
*sb,
iput(inode);
inode = NULL;
}
+   if (inode == NULL && MSDOS_SB(sb)->options.nfs) {
+   struct buffer_head *bh = NULL;
+   struct msdos_dir_entry *de ;
+   loff_t i_pos = (loff_t)ino;
+   int bits = MSDOS_SB(sb)->dir_per_block_bits;
+   loff_t blocknr = i_pos >> bits;
+   bh = sb_bread(sb, blocknr);
+   if (!bh) {
+   fat_msg(sb, KERN_ERR,
+   "unable to read block(%llu) for building NFS 
inode",
+   (llu)blocknr);
+   return inode;
+   }
+   de = (struct msdos_dir_entry *)bh->b_data;
+   inode = fat_build_inode(sb, &de[i_pos&((1

[PATCH 1/4] fat: allocate persistent inode numbers

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

All the files on a FAT partition have an on-disk directory entry.
The location of these entries, i_pos, is unique and is constructed by the
fat_make_i_pos() function.We can use this as the inode number making it
peristent across remounts.

Signed-off-by: Namjae Jeon 
Signed-off-by: Ravishankar N 
Signed-off-by: Amit Sahrawat 
---
 fs/fat/inode.c  |2 +-
 fs/fat/namei_vfat.c |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 973296b..cf111a0 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -458,7 +458,7 @@ struct inode *fat_build_inode(struct super_block *sb,
inode = ERR_PTR(-ENOMEM);
goto out;
}
-   inode->i_ino = iunique(sb, MSDOS_ROOT_INO);
+   inode->i_ino = i_pos;
inode->i_version = 1;
err = fat_fill_inode(inode, de);
if (err) {
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index e535dd7..ffb4814 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -954,6 +954,7 @@ static int vfat_rename(struct inode *old_dir, struct dentry 
*old_dentry,
new_dir->i_version++;
 
fat_detach(old_inode);
+   old_inode->i_ino = new_i_pos;
fat_attach(old_inode, new_i_pos);
if (IS_DIRSYNC(new_dir)) {
err = fat_sync_inode(old_inode);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/4] fat (exportfs): rebuild directory-inode if fat_dget()

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

This patch enables rebuilding of directory inodes which are not present
in the cache.This is done by traversing the disk clusters to find the
directory entry of the parent directory and using its i_pos to build the
inode.

Signed-off-by: Namjae Jeon 
Signed-off-by: Ravishankar N 
Signed-off-by: Amit Sahrawat 
---
 fs/fat/nfs.c |  134 --
 1 file changed, 130 insertions(+), 4 deletions(-)

diff --git a/fs/fat/nfs.c b/fs/fat/nfs.c
index 44678e4..a3685d6 100644
--- a/fs/fat/nfs.c
+++ b/fs/fat/nfs.c
@@ -97,6 +97,93 @@ struct dentry *fat_fh_to_parent(struct super_block *sb, 
struct fid *fid,
 }
 
 /*
+ * Read the directory entries of 'search_clus' and find the entry
+ * which contains 'match_ipos' for the starting cluster.If the entry
+ * is found, rebuild its inode.
+ */
+static struct inode *fat_traverse_cluster(struct super_block *sb,
+   int search_clus, int match_ipos)
+{
+   struct msdos_sb_info *sbi = MSDOS_SB(sb);
+   struct buffer_head *bh;
+   sector_t blknr;
+   int parent_ipos, search_ipos;
+   int i;
+   struct msdos_dir_entry *de;
+   struct inode *inode = NULL;
+   int iterations = sbi->cluster_size >> sb->s_blocksize_bits;
+   blknr = fat_clus_to_blknr(sbi, search_clus);
+
+   do {
+   bh = sb_bread(sb, blknr);
+   if (!bh) {
+   fat_msg(sb, KERN_ERR,
+   "unable to read block(%llu) while traversing 
cluster(%d)",
+   (llu)blknr, search_clus);
+   inode = ERR_PTR(-EIO);
+   goto out;
+   }
+   de = (struct msdos_dir_entry *)bh->b_data;
+   for (i = 0; i < sbi->dir_per_block; i++) {
+   if (de[i].name[0] == FAT_ENT_FREE) {
+   /*Reached end of directory*/
+   brelse(bh);
+   inode = ERR_PTR(-ENODATA);
+   goto out;
+   }
+   if (de[i].name[0] == DELETED_FLAG)
+   continue;
+   if (de[i].attr == ATTR_EXT)
+   continue;
+   if (!(de[i].attr & ATTR_DIR))
+   continue;
+   else {
+   search_ipos = fat_get_start(sbi, &de[i]);
+   if (search_ipos == match_ipos) {
+   /*Success.Now build the inode*/
+   parent_ipos = (loff_t)i +
+(blknr << sbi->dir_per_block_bits);
+   inode = fat_build_inode(sb, &de[i],
+   parent_ipos);
+   brelse(bh);
+   goto out;
+   }
+   }
+   }
+   brelse(bh);
+   blknr += 1;
+   } while (--iterations > 0);
+out:
+   return inode;
+}
+
+/*
+ * Read the FAT to find the next cluster in the chain
+ * corresponding to 'search_clus'.
+ */
+static int fat_read_next_clus(struct super_block *sb, int search_clus)
+{
+   struct msdos_sb_info *sbi = MSDOS_SB(sb);
+   /*bits 31 to 7 give relative sector number*/
+   sector_t blknr = search_clus >> 7;
+   /*bits 6 to 0 give offset*/
+   unsigned int offset = search_clus & 0x7F;
+   __le32 *address;
+   unsigned int next_cluster;
+   struct buffer_head *bh = sb_bread(sb, blknr + sbi->fat_start);
+   if (!bh) {
+   fat_msg(sb, KERN_ERR,
+   "unable to read block(%llu) for finding the next 
cluster in FAT chain",
+   (llu)blknr);
+   return -EIO;
+   }
+   address = (__le32 *) bh->b_data;
+   next_cluster = (le32_to_cpu(address[offset])) & 0x0FFF;
+   brelse(bh);
+   return next_cluster;
+}
+
+/*
  * Find the parent for a directory that is not currently connected to
  * the filesystem root.
  *
@@ -105,15 +192,54 @@ struct dentry *fat_fh_to_parent(struct super_block *sb, 
struct fid *fid,
 struct dentry *fat_get_parent(struct dentry *child_dir)
 {
struct super_block *sb = child_dir->d_sb;
-   struct buffer_head *bh = NULL;
+   struct buffer_head *dotdot_bh = NULL, *parent_bh = NULL;
struct msdos_dir_entry *de;
struct inode *parent_inode = NULL;
+   struct msdos_sb_info *sbi = MSDOS_SB(sb);
+   int parent_logstart;
+   int search_clus, clus_to_match;
+   sector_t blknr;
 
-   if (!fat_get_dotdot_entry(child_dir->d_inode, &bh, &de)) {
-   int parent_logstart = fat_get_start(MSDOS_SB(sb), de);
+   if (!fat_get_dotdot

[PATCH 4/4] Documentation: update nfs option in filesystem/vfat.txt

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

update nfs option in filesystem/vfat.txt

Signed-off-by: Namjae Jeon 
---
 Documentation/filesystems/vfat.txt |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/filesystems/vfat.txt 
b/Documentation/filesystems/vfat.txt
index de1e6c4..b9405aa 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -143,7 +143,8 @@ discard   -- If set, issues discard/TRIM commands to 
the block
 
 nfs   -- This option maintains an index (cache) of directory
 inodes by i_logstart which is used by the nfs-related code to
-improve look-ups.
+improve look-ups. And rebuild inode after reading
+directory entry from disk cluster if look-up fail.
 
 Enable this only if you want to export the FAT filesystem
 over NFS
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] 1-Wire: Add support for the maxim ds1825 temperature sensor

2012-08-18 Thread Evgeniy Polyakov
Hi

On Thu, Aug 16, 2012 at 12:56:40PM -0400, Raphael Assenat (r...@8d.com) wrote:
> This patch adds support for maxim ds1825 based 1-wire temperature sensors.

Looks good, thank you

> Signed-off-by: Raphael Assenat 

Greg, please pull it into your tree
Acked-by: Evgeniy Polyakov 

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/3] writeback: change nr_pages_dirtied argument into local variable

2012-08-18 Thread Namjae Jeon
There is no reason nr_pages_dirtied is argument anymore.
because nr_pages_dirtied value from caller is not used in
balance_dirty_pages_ratelimited_nr function.

Signed-off-by: Namjae Jeon 
Signed-off-by: Vivek Trivedi 
---
 fs/btrfs/disk-io.c|8 
 fs/btrfs/file.c   |3 +--
 fs/btrfs/ioctl.c  |2 +-
 fs/ocfs2/file.c   |5 +
 fs/splice.c   |5 +
 include/linux/writeback.h |9 +
 mm/page-writeback.c   |   11 +--
 7 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 62e0caf..10b6128 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3344,8 +3344,8 @@ void btrfs_btree_balance_dirty(struct btrfs_root *root, 
unsigned long nr)
num_dirty = root->fs_info->dirty_metadata_bytes;
 
if (num_dirty > thresh) {
-   balance_dirty_pages_ratelimited_nr(
-  root->fs_info->btree_inode->i_mapping, 1);
+   balance_dirty_pages_ratelimited(
+  root->fs_info->btree_inode->i_mapping);
}
return;
 }
@@ -3365,8 +3365,8 @@ void __btrfs_btree_balance_dirty(struct btrfs_root *root, 
unsigned long nr)
num_dirty = root->fs_info->dirty_metadata_bytes;
 
if (num_dirty > thresh) {
-   balance_dirty_pages_ratelimited_nr(
-  root->fs_info->btree_inode->i_mapping, 1);
+   balance_dirty_pages_ratelimited(
+  root->fs_info->btree_inode->i_mapping);
}
return;
 }
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index f6b40e8..0dae684 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1314,8 +1314,7 @@ static noinline ssize_t __btrfs_buffered_write(struct 
file *file,
 
cond_resched();
 
-   balance_dirty_pages_ratelimited_nr(inode->i_mapping,
-  dirty_pages);
+   balance_dirty_pages_ratelimited(inode->i_mapping);
if (dirty_pages < (root->leafsize >> PAGE_CACHE_SHIFT) + 1)
btrfs_btree_balance_dirty(root, 1);
 
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 7bb7556..df2e9fb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1199,7 +1199,7 @@ int btrfs_defrag_file(struct inode *inode, struct file 
*file,
}
 
defrag_count += ret;
-   balance_dirty_pages_ratelimited_nr(inode->i_mapping, ret);
+   balance_dirty_pages_ratelimited(inode->i_mapping);
mutex_unlock(&inode->i_mutex);
 
if (newer_than) {
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 46a1f6d..a83c964 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2515,18 +2515,15 @@ static ssize_t ocfs2_file_splice_write(struct 
pipe_inode_info *pipe,
ret = sd.num_spliced;
 
if (ret > 0) {
-   unsigned long nr_pages;
int err;
 
-   nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-
err = generic_write_sync(out, *ppos, ret);
if (err)
ret = err;
else
*ppos += ret;
 
-   balance_dirty_pages_ratelimited_nr(mapping, nr_pages);
+   balance_dirty_pages_ratelimited(mapping);
}
 
return ret;
diff --git a/fs/splice.c b/fs/splice.c
index 41514dd..36b6c17 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1024,17 +1024,14 @@ generic_file_splice_write(struct pipe_inode_info *pipe, 
struct file *out,
ret = sd.num_spliced;
 
if (ret > 0) {
-   unsigned long nr_pages;
int err;
 
-   nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-
err = generic_write_sync(out, *ppos, ret);
if (err)
ret = err;
else
*ppos += ret;
-   balance_dirty_pages_ratelimited_nr(mapping, nr_pages);
+   balance_dirty_pages_ratelimited(mapping);
}
sb_end_write(inode->i_sb);
 
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 50c3e8f..b82a83a 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -161,14 +161,7 @@ void __bdi_update_bandwidth(struct backing_dev_info *bdi,
unsigned long start_time);
 
 void page_writeback_init(void);
-void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
-   unsigned long nr_pages_dirtied);
-
-static inline void
-balance_dirty_pages_ratelimited(struct address_space *mapping)
-{
-   balance_dirty_pages_ratelimited_nr(mapping, 1);
-}
+void balance_dirty_pages_ratelimited(struct address_space *mapping);
 
 typedef int (*writepage_t)(struct page *page, struc

Re: [PATCH] i2c-i801: Add device tree support

2012-08-18 Thread Wolfram Sang
On Wed, Aug 08, 2012 at 09:06:47AM +0200, Thierry Reding wrote:
> This commit adds support for probing slave devices parsed from the
> device tree.
> 
> Signed-off-by: Thierry Reding 

How are the devicetree nodes of the slaves connected to this PCI device
which should not have a node itself?

> ---
>  drivers/i2c/busses/i2c-i801.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 6f00785..b5311cf 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -80,6 +80,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE
>  #include 
> @@ -1238,6 +1239,7 @@ static int __devinit i801_probe(struct pci_dev *dev,
>   goto exit_free_irq;
>   }
>  
> + of_i2c_register_devices(&priv->adapter);
>   i801_probe_optional_slaves(priv);
>   /* We ignore errors - multiplexing is optional */
>   i801_add_mux(priv);
> -- 
> 1.7.11.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


[PATCH 2/3] writeback: fix incorrect return value type of bdi_dirty_limit

2012-08-18 Thread Namjae Jeon
unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)

Above function return type is unsigned long, but return value is
kept in "u64 bdi_dirty".
It can return incorrect value by type casting.

Signed-off-by: Namjae Jeon 
---
 mm/page-writeback.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 49133b6..73a7a06 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -546,7 +546,7 @@ static unsigned long hard_dirty_limit(unsigned long thresh)
  */
 unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long 
dirty)
 {
-   u64 bdi_dirty;
+   unsigned long bdi_dirty;
long numerator, denominator;
 
/*
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/3] writeback: add dirty_ratio_time per bdi variable

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

This patch is based on suggestion by Wu Fengguang:
https://lkml.org/lkml/2011/8/19/19

kernel has mechanism to do writeback as per dirty_ratio and dirty_background
ratio. It also maintains per task dirty rate limit to keep balance of
dirty pages at any given instance by doing bdi bandwidth estimation.

Kernel also has max_ratio/min_ratio tunables to specify percentage of writecache
to control per bdi dirty limits and task throtelling.

However, there might be a usecase where user wants a writeback tuning
parameter to flush dirty data at desired/tuned time interval.

dirty_background_time provides an interface where user can tune background
writeback start time using /sys/block/sda/bdi/dirty_background_time

dirty_background_time is used alongwith average bdi write bandwidth estimation
to start background writeback.

One of the use case to demonstrate the patch functionality can be
on NFS setup:-
We have a NFS setup with ethernet line of 100Mbps, while the USB
disk is attached to server, which has a local speed of 25MBps. Server
and client both are arm target boards.

Now if we perform a write operation over NFS (client to server), as
per the network speed, data can travel at max speed of 100Mbps. But
if we check the default write speed of USB hdd over NFS it comes
around to 8MB/sec, far below the speed of network.

Reason being is as per the NFS logic, during write operation, initially
pages are dirtied on NFS client side, then after reaching the dirty
threshold/writeback limit (or in case of sync) data is actually sent
to NFS server (so now again pages are dirtied on server side). This
will be done in COMMIT call from client to server i.e if 100MB of data
is dirtied and sent then it will take minimum 100MB/10Mbps ~ 8-9 seconds.

After the data is received, now it will take approx 100/25 ~4 Seconds to
write the data to USB Hdd on server side. Hence making the overall time
to write this much of data ~12 seconds, which in practically comes out to
be near 7 to 8MB/second. After this a COMMIT response will be sent to NFS
client.

However we may improve this write performace by making the use of NFS
server idle time i.e while data is being received from the client,
simultaneously initiate the writeback thread on server side. So instead
of waiting for the complete data to come and then start the writeback,
we can work in parallel while the network is still busy in receiving the
data. Hence in this way overall performace will be improved.

If we tune dirty_background_time, we can see there
is increase in the performace and it comes out to be ~ 11MB/seconds.
Results are:-
==
Case:1 - Normal setup without any changes
./performancetest_arm ./100MB write

 RecSize  WriteSpeed   RanWriteSpeed

 10485760  7.93MB/sec   8.11MB/sec
  1048576  8.21MB/sec   7.80MB/sec
   524288  8.71MB/sec   8.39MB/sec
   262144  8.91MB/sec   7.83MB/sec
   131072  8.91MB/sec   8.95MB/sec
65536  8.95MB/sec   8.90MB/sec
32768  8.76MB/sec   8.93MB/sec
16384  8.78MB/sec   8.67MB/sec
 8192  8.90MB/sec   8.52MB/sec
 4096  8.89MB/sec   8.28MB/sec

Average speed is near 8MB/seconds.

Case:2 - Modified the dirty_background_time
./performancetest_arm ./100MB write

 RecSize  WriteSpeed   RanWriteSpeed

 10485760  10.56MB/sec  10.37MB/sec
  1048576  10.43MB/sec  10.33MB/sec
   524288  10.32MB/sec  10.02MB/sec
   262144  10.52MB/sec  10.19MB/sec
   131072  10.34MB/sec  10.07MB/sec
65536  10.31MB/sec  10.06MB/sec
32768  10.27MB/sec  10.24MB/sec
16384  10.54MB/sec  10.03MB/sec
 8192  10.41MB/sec  10.38MB/sec
 4096  10.34MB/sec  10.12MB/sec

we can see, average write speed is increased to ~10-11MB/sec.


Now to make this working we need to make change in dirty_[wirteback|expire]
_interval so that flusher threads will be awaken up more early. But if we
modify these values it will impact the overall system performace, while our
requirement is to modify these parameters for the device used in NFS interface.

This patch provides the changes per block devices. So that we may modify the
intervals as per the device and overall system is not impacted by the changes
and we get improved

The above mentioned is one of the use case to use this patch.

Original-patch-by: Wu Fengguang 
Signed-off-by: Namjae Jeon 
Tested-by: Vivek Trivedi 
---
 fs/fs-writeback.c   |   18 --
 include/linux/backing-dev.h |1 +
 include/linux/writeback.h   |1 +
 mm/backing-dev.c|   22 ++
 mm/page-writeback.c |3 ++-
 5 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index be3efc4..75fda1d 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -769,6 +769,19 @@ static bool over_bground_thresh(struct backing_dev_info 
*bdi)
return false;
 }
 
+bool over_dirty_bground_time(struct backi

Re: [PATCH RESEND 1/2] i2c: pnx: Fix bit definitions

2012-08-18 Thread Wolfram Sang
On Wed, Aug 08, 2012 at 09:42:31AM +0200, Roland Stigge wrote:
> The I2C Control Register bits RFDAIE and RFFIE were mixed up. In addition to
> this fix, this patch adds the missing bit DRSIE for completeness.
> 
> Signed-off-by: Roland Stigge 
> 
> ---
> Applies to v3.6-rc1
> 
> This patch for i2c-pnx affects PNX4008 and LPC32xx (and LPC31xx, not yet in
> mainline). Can you please test and double-check the manuals of PNX4008 and
> LPC31xx? I only found this via the manual of LPC32xx but assume it's the same
> for the others, also.
> 
> Thanks in advance!

Kevin, since the other manuals seem to be not easily available, can you
please check?

Thanks,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH RESEND 2/2] i2c: pnx: Fix read transactions of >= 2 bytes

2012-08-18 Thread Wolfram Sang
On Wed, Aug 08, 2012 at 09:42:32AM +0200, Roland Stigge wrote:
> On transactions with n>=2 bytes, the controller actually wrongly clocks in n+1
> bytes. This is caused by the (wrong) assumption that RFE in the Status 
> Register
> is 1 iff there is no byte already ordered (via a dummy TX byte). This lead to
> the implementation of synchronized byte ordering, e.g.:
> 
> Dummy-TX - RX - Dummy-TX - RX - ...
> 
> But since RFE actually stays high after some Dummy-TX, it rather looks like:
> 
> Dummy-TX - Dummy-TX - RX - Dummy-TX - RX - (RX)
> 
> The last RX byte is clocked in by the bus controller, but ignored by the 
> kernel
> when filling the userspace buffer.
> 
> This patch fixes the issue by asking for RX via Dummy-TX asynchronously.
> Introducing a separate counter for TX bytes.
> 
> Signed-off-by: Roland Stigge 
> 
> ---
> Applies to v3.6-rc1
> 
> This patch for i2c-pnx affects PNX4008 and LPC32xx (and LPC31xx, not yet in
> mainline). Can you please test?
> 
> Thanks in advance!

I assume you checked this on LPC32xx? I'll wait a bit more but tend to
take the patch anyhow, even if there is no explicit ACK from PNX.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH] fat: use accessor function for msdos_dir_entry 'start'

2012-08-18 Thread Namjae Jeon
2012/8/12, OGAWA Hirofumi :
> Namjae Jeon  writes:
>
>> Use accessor function for msdos_dir_entry 'start'
>
> Acked-by: OGAWA Hirofumi 
>
> Looks good. Thanks.
>
>> Signed-off-by: Namjae Jeon 
>> Signed-off-by: Amit Sahrawat 
>> ---
>>  fs/fat/dir.c |6 ++
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
>> index 7b1b9c1..2f3e66e 100644
>> --- a/fs/fat/dir.c
>> +++ b/fs/fat/dir.c
>> @@ -1143,10 +1143,8 @@ int fat_alloc_new_dir(struct inode *dir, struct
>> timespec *ts)
>>  de[0].ctime_cs = de[1].ctime_cs = 0;
>>  de[0].adate = de[0].cdate = de[1].adate = de[1].cdate = 0;
>>  }
>> -de[0].start = cpu_to_le16(cluster);
>> -de[0].starthi = cpu_to_le16(cluster >> 16);
>> -de[1].start = cpu_to_le16(MSDOS_I(dir)->i_logstart);
>> -de[1].starthi = cpu_to_le16(MSDOS_I(dir)->i_logstart >> 16);
>> +fat_set_start(&de[0], cluster);
>> +fat_set_start(&de[1], MSDOS_I(dir)->i_logstart);
>>  de[0].size = de[1].size = 0;
>>  memset(de + 2, 0, sb->s_blocksize - 2 * sizeof(*de));
>>  set_buffer_uptodate(bhs[0]);
>
> --
> OGAWA Hirofumi 
>
Hi. Andrew.

Would you plz check this patch ?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND] udf: extent cache implementation for manipulating block map

2012-08-18 Thread Namjae Jeon
From: Namjae Jeon 

While mapping logical blocks of a file to physical blocks on the partition,
everytime UDF read file metadata from the begining which decrease preformance.
The drawback of this scheme is more prominent while reading large files.
For example, while reading a large file of ~5GB, read speed will
gradually become less as we near the end of file because of the time
taken in calculating the corresponding physical block.

This patch implements caching and remembers the location of the last read
extent. Instead of reading file metadata from begining, start from the
cached location.

Signed-off-by: Namjae Jeon 
Signed-off-by: Ashish Sangwan 
Signed-off-by: Bonggil Bak 
---
 fs/udf/ialloc.c  |2 ++
 fs/udf/inode.c   |   83 ++
 fs/udf/udf_i.h   |   13 +
 fs/udf/udfdecl.h |   13 +
 4 files changed, 105 insertions(+), 6 deletions(-)

diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index 7e5aae4..7dd86a4 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -117,6 +117,8 @@ struct inode *udf_new_inode(struct inode *dir, umode_t 
mode, int *err)
iinfo->i_lenAlloc = 0;
iinfo->i_use = 0;
iinfo->i_checkpoint = 1;
+   memset(&iinfo->cached_extent, 0, sizeof(struct udf_ext_cache));
+   mutex_init(&(iinfo->i_extent_cache_lock));
if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_AD_IN_ICB))
iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB;
else if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index fafaad7..cf34dec 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -345,7 +345,7 @@ static int udf_get_block(struct inode *inode, sector_t 
block,
iinfo->i_next_alloc_goal++;
}
 
-
+   udf_clear_extent_cache(iinfo);
phys = inode_getblk(inode, block, &err, &new);
if (!phys)
goto abort;
@@ -1117,6 +1117,7 @@ int udf_setsize(struct inode *inode, loff_t newsize)
iinfo = UDF_I(inode);
if (newsize > inode->i_size) {
down_write(&iinfo->i_data_sem);
+   udf_clear_extent_cache(iinfo);
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
if (bsize <
(udf_file_entry_alloc_offset(inode) + newsize)) {
@@ -1137,6 +1138,7 @@ int udf_setsize(struct inode *inode, loff_t newsize)
} else {
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
down_write(&iinfo->i_data_sem);
+   udf_clear_extent_cache(iinfo);
memset(iinfo->i_ext.i_data + iinfo->i_lenEAttr + 
newsize,
   0x00, bsize - newsize -
   udf_file_entry_alloc_offset(inode));
@@ -1150,6 +1152,7 @@ int udf_setsize(struct inode *inode, loff_t newsize)
if (err)
return err;
down_write(&iinfo->i_data_sem);
+   udf_clear_extent_cache(iinfo);
truncate_setsize(inode, newsize);
udf_truncate_extents(inode);
up_write(&iinfo->i_data_sem);
@@ -1267,6 +1270,8 @@ static void udf_fill_inode(struct inode *inode, struct 
buffer_head *bh)
iinfo->i_lenAlloc = 0;
iinfo->i_next_alloc_block = 0;
iinfo->i_next_alloc_goal = 0;
+   memset(&iinfo->cached_extent, 0, sizeof(struct udf_ext_cache));
+   mutex_init(&(iinfo->i_extent_cache_lock));
if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_EFE)) {
iinfo->i_efe = 1;
iinfo->i_use = 0;
@@ -2118,14 +2123,21 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits;
loff_t lbcount = 0, bcount =
(loff_t) block << blocksize_bits;
-   int8_t etype;
+   int8_t etype = -1;
struct udf_inode_info *iinfo;
 
iinfo = UDF_I(inode);
-   pos->offset = 0;
-   pos->block = iinfo->i_location;
-   pos->bh = NULL;
-   *elen = 0;
+
+   if (udf_read_extent_cache(inode, &bcount, &lbcount, elen,
+   pos, eloc, &etype)) {
+   if (etype != -1)
+   goto cache_hit;
+   } else {
+   pos->offset = 0;
+   pos->block = iinfo->i_location;
+   pos->bh = NULL;
+   *elen = 0;
+   }
 
do {
etype = udf_next_aext(inode, pos, eloc, elen, 1);
@@ -2137,11 +2149,70 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
lbcount += *elen;
} while (lbcount <= bcount);
 
+   /* update extent cache */
+   udf_update_extent_cache(inode, elen, pos, &lbcount, eloc, &etype);
+
+cache_hit:
*offset = (bcount + *elen - lbcount) >> blocksize_bits;
 
return etype;
 }
 
+int udf_read_extent_cache(struc

Re: [ 32/37] drm/i915: correctly order the ring init sequence

2012-08-18 Thread Daniel Vetter
On Sat, Aug 18, 2012 at 1:29 AM, Herton Ronaldo Krzesinski
 wrote:
> On Fri, Aug 17, 2012 at 04:03:15AM +0100, Ben Hutchings wrote:
>> 3.2-stable review patch.  If anyone has any objections, please let me know.
>>
>> --
>>
>> From: Daniel Vetter 
>>
>> commit 0d8957c8a90bbb5d34fab9a304459448a5131e06 upstream.
>>
>> We may only start to set up the new register values after having
>> confirmed that the ring is truely off. Otherwise the hw might lose the
>> newly written register values. This is caught later on in the init
>> sequence, when we check whether the register writes have stuck.
>>
>> Reviewed-by: Jani Nikula 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50522
>> Tested-by: Yang Guang 
>> Signed-off-by: Daniel Vetter 
>> Signed-off-by: Ben Hutchings 
> [...]
>
> With this commit on 3.2, i915 fails to initialize on a G41 based machine
> I have here:
>
> [   36.894261] i915 :00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [   36.894265] i915 :00:02.0: setting latency timer to 64
> [   36.933118] mtrr: type mismatch for d000,1000 old: write-back new: 
> write-combining
> [   36.933121] [drm] MTRR allocation failed.  Graphics performance may suffer.
> [   36.933467] i915 :00:02.0: irq 42 for MSI/MSI-X
> [   36.933471] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
> [   36.933472] [drm] Driver supports precise vblank timestamp query.
> [   36.933498] vgaarb: device changed decodes: 
> PCI::00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
> [   36.969669] [drm:init_ring_common] *ERROR* render ring initialization 
> failed ctl 0001f001 head 1074 tail  start 1000
> [   36.969763] vga_switcheroo: disabled
> [   36.969765] [drm:i915_driver_load] *ERROR* failed to init modeset
> [   36.987444] i915 :00:02.0: PCI INT A disabled
> [   36.987453] i915: probe of :00:02.0 failed with error -5
>
> Taking a look at it, I suspected of a timing issue, especially looking at
> this commit, which isn't on 3.2:
>
> commit f01db988ef6f6c70a6cc36ee71e4a98a68901229
> Author: Sean Paul 
> Date:   Fri Mar 16 12:43:22 2012 -0400
>
> drm/i915: Add wait_for in init_ring_common
>
> And picking it made the issue go away, so the extra delay helped and is needed
> with 0d8957c8a90bbb5d34fab9a304459448a5131e06 applied here.

Good catch, I've forgotten to check whether all the recent ring_init
patches have gone  through cc: stable. For the stable team, please
pick up both patches:

f01db988ef6f6c70a6cc36ee71e4a98a68901229 and
0d8957c8a90bbb5d34fab9a304459448a5131e06

Note that all kernels that need f01db backported also need
b7884eb45ec98c0d34c7f49005ae9d4b4b4e38f6 (to fix a regression
introduce by the former).

Yeah, the ring init sequence is a fickle beast :( but I'm pretty sure
with these three patches, stable kernels should be up to date and have
all the latest fixes.

Yours, Daniel
-- 
Daniel Vetter
daniel.vet...@ffwll.ch - +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net/stmmac: fix issue of clk_get for Loongson1B.

2012-08-18 Thread Kelvin Cheung
When getting clock, give a chance to the CPUs without DT support,
which use Common Clock Framework, such as Loongson1B.

Signed-off-by: Kelvin Cheung 
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index fd8882f..c136162 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2077,7 +2077,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device 
*device,
goto error_netdev_register;
}
 
-   priv->stmmac_clk = clk_get(priv->device, NULL);
+   priv->stmmac_clk = clk_get(priv->device, STMMAC_RESOURCE_NAME);
if (IS_ERR(priv->stmmac_clk)) {
pr_warning("%s: warning: cannot get CSR clock\n", __func__);
goto error_clk_get;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] clk: add Loongson1B clock support

2012-08-18 Thread Kelvin Cheung
This adds clock support to Loongson1B SoC using the common clock
infrastructure.

Signed-off-by: Kelvin Cheung 
---
 drivers/clk/Makefile   |1 +
 drivers/clk/clk-ls1x.c |  108 
 2 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 drivers/clk/clk-ls1x.c

diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 5869ea3..018ec57 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_ARCH_SOCFPGA)+= socfpga/
 obj-$(CONFIG_PLAT_SPEAR)   += spear/
 obj-$(CONFIG_ARCH_U300)+= clk-u300.o
 obj-$(CONFIG_ARCH_INTEGRATOR)  += versatile/
+obj-$(CONFIG_MACH_LOONGSON1)   += clk-ls1x.o
 
 # Chip specific
 obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
diff --git a/drivers/clk/clk-ls1x.c b/drivers/clk/clk-ls1x.c
new file mode 100644
index 000..0aadf9d
--- /dev/null
+++ b/drivers/clk/clk-ls1x.c
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2012 Zhang, Keguang 
+ *
+ * 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 the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#define OSC33
+
+static DEFINE_SPINLOCK(_lock);
+
+int ls1x_pll_clk_enable(struct clk_hw *hw)
+{
+   return 0;
+}
+
+void ls1x_pll_clk_disable(struct clk_hw *hw)
+{
+}
+
+static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
+unsigned long parent_rate)
+{
+   u32 pll, rate;
+
+   pll = __raw_readl(LS1X_CLK_PLL_FREQ);
+   rate = ((12 + (pll & 0x3f)) * 100) +
+   pll >> 8) & 0x3ff) * 100) >> 10);
+   rate *= OSC;
+   rate >>= 1;
+
+   return rate;
+}
+
+static const struct clk_ops ls1x_pll_clk_ops = {
+   .enable = ls1x_pll_clk_enable,
+   .disable = ls1x_pll_clk_disable,
+   .recalc_rate = ls1x_pll_recalc_rate,
+};
+
+static struct clk * __init clk_register_pll(struct device *dev,
+const char *name, const char *parent_name, unsigned long flags)
+{
+   struct clk_hw *hw;
+   struct clk *clk;
+   struct clk_init_data init;
+
+   /* allocate the divider */
+   hw = kzalloc(sizeof(struct clk_hw), GFP_KERNEL);
+   if (!hw) {
+   pr_err("%s: could not allocate clk_hw\n", __func__);
+   return ERR_PTR(-ENOMEM);
+   }
+
+   init.name = name;
+   init.ops = &ls1x_pll_clk_ops;
+   init.flags = flags | CLK_IS_BASIC;
+   init.parent_names = (parent_name ? &parent_name : NULL);
+   init.num_parents = (parent_name ? 1 : 0);
+   hw->init = &init;
+
+   /* register the clock */
+   clk = clk_register(dev, hw);
+
+   if (IS_ERR(clk))
+   kfree(hw);
+
+   return clk;
+}
+
+void __init ls1x_clk_init(void)
+{
+   struct clk *clk;
+
+   clk = clk_register_pll(NULL, "pll_clk", NULL, CLK_IS_ROOT);
+   clk_prepare_enable(clk);
+
+   clk = clk_register_divider(NULL, "cpu_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_CPU_SHIFT,
+   DIV_CPU_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "cpu", NULL);
+
+   clk = clk_register_divider(NULL, "ddr_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DDR_SHIFT,
+   DIV_DDR_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "ddr", NULL);
+   clk_register_clkdev(clk, "stmmaceth", NULL);
+
+   clk = clk_register_divider(NULL, "dc_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DC_SHIFT,
+   DIV_DC_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "dc", NULL);
+   clk_register_clkdev(clk, "serial8250", NULL);
+}
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [UDL] general protection fault in fb_deferred_io_mkwrite()

2012-08-18 Thread Thomas Meyer
Am Sonntag, den 12.08.2012, 14:22 -0700 schrieb Bernie Thompson:
> On Sun, Aug 12, 2012 at 3:34 AM, Thomas Meyer  wrote:
> guilty driver is probably udl_fb.c
> any ideas?
> 
> 
> Hi Thomas,

Hi Bernie!


> We were seeing similar issues in udlfb (the original fbdev version of
> this driver), which were fixed earlier this year by getting all
> rendering operations out of probe/disconnect -- those which might
> trigger fb_defio page faults in an inappropriate context, or be
> long-running. Here's some more detail:
> http://plugable.com/2012/06/21/displaylink-usb-devices-on-linux-kernel-3-4-0/comment-page-1/#comment-5896
>  
> 
> 
> Unfortunately, I haven't had time to get going with udl myself, so
> haven't been able to port and confirm.  Thanks for raising and staying
> on this.

Okay, I see. I'll switch to FB_UDL for now and remove DRM_UDL from my
config.

Is somebody working on porting commit
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=8d21547d3c9c3bc653261f26d554cfabc4a083de
 to the DRM_UDL driver?

In Airlie's tree seems to be no commit related to this:

http://cgit.freedesktop.org/~airlied/linux/

with kind regards
thomas

> 
> 
> Best wishes,
> Bernie 
> 
> 
> [   45.66] RIP  []
> fb_deferred_io_mkwrite+0xdc/0xf0
> [   45.66]  RSP 
> [   45.711547] ---[ end trace d4732d5a0bf375fb ]---
> [   45.720961] released /dev/fb1 user=1 count=0
> 
> 



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 3.0+ NFS issues (bisected)

2012-08-18 Thread J. Bruce Fields
On Sat, Aug 18, 2012 at 10:49:31AM +0400, Michael Tokarev wrote:
> On 18.08.2012 02:32, J. Bruce Fields wrote:
> > On Fri, Aug 17, 2012 at 04:08:07PM -0400, J. Bruce Fields wrote:
> >> Wait a minute, that assumption's a problem because that calculation
> >> depends in part on xpt_reserved, which is changed here
> >>
> >> In particular, svc_xprt_release() calls svc_reserve(rqstp, 0), which
> >> subtracts rqstp->rq_reserved and then calls svc_xprt_enqueue, now with a
> >> lower xpt_reserved value.  That could well explain this.
> > 
> > So, maybe something like this?
> 
> Well.  What can I say?  With the change below applied (to 3.2 kernel
> at least), I don't see any stalls or high CPU usage on the server
> anymore.  It survived several multi-gigabyte transfers, for several
> hours, without any problem.  So it is a good step forward ;)
> 
> But the whole thing seems to be quite a bit fragile.  I tried to follow
> the logic in there, and the thing is quite a bit, well, "twisted", and
> somewhat difficult to follow.  So I don't know if this is the right
> fix or not.  At least it works! :)

Suggestions welcomed.

> And I really wonder why no one else reported this problem before.
> Is me the only one in this world who uses linux nfsd? :)

This, for example:

http://marc.info/?l=linux-nfs&m=134131915612287&w=2

may well describe the same problem  It just needed some debugging
persistence, thanks!

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] i2c-i801: Add device tree support

2012-08-18 Thread Thierry Reding
On Sat, Aug 18, 2012 at 11:48:46AM +0200, Wolfram Sang wrote:
> On Wed, Aug 08, 2012 at 09:06:47AM +0200, Thierry Reding wrote:
> > This commit adds support for probing slave devices parsed from the
> > device tree.
> > 
> > Signed-off-by: Thierry Reding 
> 
> How are the devicetree nodes of the slaves connected to this PCI device
> which should not have a node itself?

The matching is done by pci_set_of_node() and pci_set_bus_of_node().
The latter will eventually call pcibios_get_phb_of_node(). What makes
you say that PCI devices shouldn't have nodes themselves?

Thierry


pgpwqPXXqgYRN.pgp
Description: PGP signature


Re: [PATCH] clk: add Loongson1B clock support

2012-08-18 Thread Belisko Marek
On Sat, Aug 18, 2012 at 12:55 PM, Kelvin Cheung  wrote:
> This adds clock support to Loongson1B SoC using the common clock
> infrastructure.
>
> Signed-off-by: Kelvin Cheung 
> ---
>  drivers/clk/Makefile   |1 +
>  drivers/clk/clk-ls1x.c |  108 
> 
>  2 files changed, 109 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/clk/clk-ls1x.c
>
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 5869ea3..018ec57 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -10,6 +10,7 @@ obj-$(CONFIG_ARCH_SOCFPGA)+= socfpga/
>  obj-$(CONFIG_PLAT_SPEAR)   += spear/
>  obj-$(CONFIG_ARCH_U300)+= clk-u300.o
>  obj-$(CONFIG_ARCH_INTEGRATOR)  += versatile/
> +obj-$(CONFIG_MACH_LOONGSON1)   += clk-ls1x.o
>
>  # Chip specific
>  obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
> diff --git a/drivers/clk/clk-ls1x.c b/drivers/clk/clk-ls1x.c
> new file mode 100644
> index 000..0aadf9d
> --- /dev/null
> +++ b/drivers/clk/clk-ls1x.c
> @@ -0,0 +1,108 @@
> +/*
> + * Copyright (c) 2012 Zhang, Keguang 
> + *
> + * 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 the
> + * Free Software Foundation;  either version 2 of the  License, or (at your
> + * option) any later version.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +#define OSC33
> +
> +static DEFINE_SPINLOCK(_lock);
> +
> +int ls1x_pll_clk_enable(struct clk_hw *hw)
static
> +{
> +   return 0;
> +}
> +
> +void ls1x_pll_clk_disable(struct clk_hw *hw)
 also static
> +{
> +}
> +
> +static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
> +unsigned long parent_rate)
> +{
> +   u32 pll, rate;
> +
> +   pll = __raw_readl(LS1X_CLK_PLL_FREQ);
> +   rate = ((12 + (pll & 0x3f)) * 100) +
> +   pll >> 8) & 0x3ff) * 100) >> 10);
> +   rate *= OSC;
> +   rate >>= 1;
> +
> +   return rate;
> +}
> +
> +static const struct clk_ops ls1x_pll_clk_ops = {
> +   .enable = ls1x_pll_clk_enable,
> +   .disable = ls1x_pll_clk_disable,
> +   .recalc_rate = ls1x_pll_recalc_rate,
> +};
> +
> +static struct clk * __init clk_register_pll(struct device *dev,
> +const char *name, const char *parent_name, unsigned long flags)
> +{
> +   struct clk_hw *hw;
> +   struct clk *clk;
> +   struct clk_init_data init;
> +
> +   /* allocate the divider */
> +   hw = kzalloc(sizeof(struct clk_hw), GFP_KERNEL);
> +   if (!hw) {
> +   pr_err("%s: could not allocate clk_hw\n", __func__);
> +   return ERR_PTR(-ENOMEM);
> +   }
> +
> +   init.name = name;
> +   init.ops = &ls1x_pll_clk_ops;
> +   init.flags = flags | CLK_IS_BASIC;
> +   init.parent_names = (parent_name ? &parent_name : NULL);
> +   init.num_parents = (parent_name ? 1 : 0);
> +   hw->init = &init;
> +
> +   /* register the clock */
> +   clk = clk_register(dev, hw);
> +
> +   if (IS_ERR(clk))
> +   kfree(hw);
> +
> +   return clk;
> +}
> +
> +void __init ls1x_clk_init(void)
> +{
> +   struct clk *clk;
> +
> +   clk = clk_register_pll(NULL, "pll_clk", NULL, CLK_IS_ROOT);
> +   clk_prepare_enable(clk);
> +
> +   clk = clk_register_divider(NULL, "cpu_clk", "pll_clk",
> +   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_CPU_SHIFT,
> +   DIV_CPU_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
> +   clk_prepare_enable(clk);
> +   clk_register_clkdev(clk, "cpu", NULL);
> +
> +   clk = clk_register_divider(NULL, "ddr_clk", "pll_clk",
> +   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DDR_SHIFT,
> +   DIV_DDR_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
> +   clk_prepare_enable(clk);
> +   clk_register_clkdev(clk, "ddr", NULL);
> +   clk_register_clkdev(clk, "stmmaceth", NULL);
> +
> +   clk = clk_register_divider(NULL, "dc_clk", "pll_clk",
> +   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DC_SHIFT,
> +   DIV_DC_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
> +   clk_prepare_enable(clk);
> +   clk_register_clkdev(clk, "dc", NULL);
> +   clk_register_clkdev(clk, "serial8250", NULL);
> +}
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

cheers,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
w

Re: [PATCH RESEND] remove the queue unlock in scsi_requset_fn

2012-08-18 Thread Bart Van Assche
On 08/16/12 07:52, Bart Van Assche wrote:
> On 08/16/12 01:35, Chanho Min wrote:
>>> functions will occur in line.  I also don't see why the sdev reference
>>> couldn't drop to zero here.
>> scsi_request_fn is called under the lock of request_queue->queue_lock.
>> If we drop the sdev reference to zero here,
>> scsi_device_dev_release_usercontext is
>> invoked and make request_queue to NULL. When caller of scsi_request_fn try to
>> unlock request_queue->queue_lock, the oops is occurred.
> 
> Whether or not your patch is applied, if the put_device() call in
> scsi_request_fn() decreases the sdev reference count to zero, the
> scsi_request_fn() caller will still try to unlock the queue lock after
> scsi_request_fn() finished and hence will trigger a use-after-free. I'm
> afraid the only real solution is to modify the SCSI and/or block layers
> such that scsi_remove_device() can't finish while scsi_request_fn() is
> in progress. And once that is guaranteed the get_device() / put_device()
> pair can be left out from scsi_request_fn().

(replying to my own e-mail)

How about the patch below ?

[PATCH] Fix device removal race

If the put_device() call in scsi_request_fn() drops the sdev refcount
to zero then the spin_lock_irq() call after the put_device() call
triggers a use-after-free. Avoid that by making sure that blk_cleanup_queue()
can only finish after all active scsi_request_fn() calls have returned.
---
 block/blk-core.c|1 +
 drivers/scsi/scsi_lib.c |   10 ++
 include/linux/blkdev.h  |5 +
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 4b4dbdf..0e4da3b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -388,6 +388,7 @@ void blk_drain_queue(struct request_queue *q, bool 
drain_all)
__blk_run_queue(q);
 
drain |= q->nr_rqs_elvpriv;
+   drain |= q->request_fn_active;
 
/*
 * Unfortunately, requests are queued at and tracked from
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ffd7773..10bb348 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1514,9 +1514,7 @@ static void scsi_request_fn(struct request_queue *q)
struct scsi_cmnd *cmd;
struct request *req;
 
-   if(!get_device(&sdev->sdev_gendev))
-   /* We must be tearing the block queue down already */
-   return;
+   q->request_fn_active++;
 
/*
 * To start with, we keep looping until the queue is empty, or until
@@ -1626,11 +1624,7 @@ out_delay:
if (sdev->device_busy == 0)
blk_delay_queue(q, SCSI_QUEUE_DELAY);
 out:
-   /* must be careful here...if we trigger the ->remove() function
-* we cannot be holding the q lock */
-   spin_unlock_irq(q->queue_lock);
-   put_device(&sdev->sdev_gendev);
-   spin_lock_irq(q->queue_lock);
+   q->request_fn_active--;
 }
 
 u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 4e72a9d..11c1987 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -377,6 +377,11 @@ struct request_queue {
 
unsigned intnr_sorted;
unsigned intin_flight[2];
+   /*
+* Number of active request_fn() calls for those request_fn()
+* implementations that unlock the queue_lock, e.g. scsi_request_fn().
+*/
+   unsigned intrequest_fn_active;
 
unsigned intrq_timeout;
struct timer_list   timeout;
-- 
1.7.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] MIPS: Loongson1B: use common clock infrastructure instead of private APIs.

2012-08-18 Thread Kelvin Cheung
1. Remove private clock APIs, which are replaced by the code in
   drivers/clk/clk-ls1x.c
2. Enable COMMON_CLK in the Kconfig.
3. some minor modifications.

Signed-off-by: Kelvin Cheung 
---
 arch/mips/include/asm/mach-loongson1/platform.h |3 +-
 arch/mips/include/asm/mach-loongson1/regs-clk.h |7 +-
 arch/mips/loongson1/Kconfig |2 +-
 arch/mips/loongson1/common/clock.c  |  159 +--
 arch/mips/loongson1/common/platform.c   |9 +-
 arch/mips/loongson1/ls1b/board.c|5 +-
 6 files changed, 16 insertions(+), 169 deletions(-)

diff --git a/arch/mips/include/asm/mach-loongson1/platform.h 
b/arch/mips/include/asm/mach-loongson1/platform.h
index 2f17161..718a122 100644
--- a/arch/mips/include/asm/mach-loongson1/platform.h
+++ b/arch/mips/include/asm/mach-loongson1/platform.h
@@ -18,6 +18,7 @@ extern struct platform_device ls1x_eth0_device;
 extern struct platform_device ls1x_ehci_device;
 extern struct platform_device ls1x_rtc_device;
 
-void ls1x_serial_setup(void);
+extern void __init ls1x_clk_init(void);
+extern void __init ls1x_serial_setup(struct platform_device *pdev);
 
 #endif /* __ASM_MACH_LOONGSON1_PLATFORM_H */
diff --git a/arch/mips/include/asm/mach-loongson1/regs-clk.h 
b/arch/mips/include/asm/mach-loongson1/regs-clk.h
index 8efa7fb..a81fa3d 100644
--- a/arch/mips/include/asm/mach-loongson1/regs-clk.h
+++ b/arch/mips/include/asm/mach-loongson1/regs-clk.h
@@ -20,14 +20,15 @@
 
 /* Clock PLL Divisor Register Bits */
 #define DIV_DC_EN  (0x1 << 31)
-#define DIV_DC (0x1f << 26)
 #define DIV_CPU_EN (0x1 << 25)
-#define DIV_CPU(0x1f << 20)
 #define DIV_DDR_EN (0x1 << 19)
-#define DIV_DDR(0x1f << 14)
 
 #define DIV_DC_SHIFT   26
 #define DIV_CPU_SHIFT  20
 #define DIV_DDR_SHIFT  14
 
+#define DIV_DC_WIDTH   5
+#define DIV_CPU_WIDTH  5
+#define DIV_DDR_WIDTH  5
+
 #endif /* __ASM_MACH_LOONGSON1_REGS_CLK_H */
diff --git a/arch/mips/loongson1/Kconfig b/arch/mips/loongson1/Kconfig
index a9a14d6..fbf75f6 100644
--- a/arch/mips/loongson1/Kconfig
+++ b/arch/mips/loongson1/Kconfig
@@ -15,7 +15,7 @@ config LOONGSON1_LS1B
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_HIGHMEM
select SYS_HAS_EARLY_PRINTK
-   select HAVE_CLK
+   select COMMON_CLK
 
 endchoice
 
diff --git a/arch/mips/loongson1/common/clock.c 
b/arch/mips/loongson1/common/clock.c
index 1ec..07133de 100644
--- a/arch/mips/loongson1/common/clock.c
+++ b/arch/mips/loongson1/common/clock.c
@@ -7,175 +7,22 @@
  * option) any later version.
  */
 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
-
-#include 
-
-static LIST_HEAD(clocks);
-static DEFINE_MUTEX(clocks_mutex);
-
-struct clk *clk_get(struct device *dev, const char *name)
-{
-   struct clk *c;
-   struct clk *ret = NULL;
-
-   mutex_lock(&clocks_mutex);
-   list_for_each_entry(c, &clocks, node) {
-   if (!strcmp(c->name, name)) {
-   ret = c;
-   break;
-   }
-   }
-   mutex_unlock(&clocks_mutex);
-
-   return ret;
-}
-EXPORT_SYMBOL(clk_get);
-
-int clk_enable(struct clk *clk)
-{
-   return 0;
-}
-EXPORT_SYMBOL(clk_enable);
-
-void clk_disable(struct clk *clk)
-{
-}
-EXPORT_SYMBOL(clk_disable);
-
-unsigned long clk_get_rate(struct clk *clk)
-{
-   return clk->rate;
-}
-EXPORT_SYMBOL(clk_get_rate);
-
-void clk_put(struct clk *clk)
-{
-}
-EXPORT_SYMBOL(clk_put);
-
-static void pll_clk_init(struct clk *clk)
-{
-   u32 pll;
-
-   pll = __raw_readl(LS1X_CLK_PLL_FREQ);
-   clk->rate = (12 + (pll & 0x3f)) * 33 / 2
-   + ((pll >> 8) & 0x3ff) * 33 / 1024 / 2;
-   clk->rate *= 100;
-}
-
-static void cpu_clk_init(struct clk *clk)
-{
-   u32 pll, ctrl;
-
-   pll = clk_get_rate(clk->parent);
-   ctrl = __raw_readl(LS1X_CLK_PLL_DIV) & DIV_CPU;
-   clk->rate = pll / (ctrl >> DIV_CPU_SHIFT);
-}
-
-static void ddr_clk_init(struct clk *clk)
-{
-   u32 pll, ctrl;
-
-   pll = clk_get_rate(clk->parent);
-   ctrl = __raw_readl(LS1X_CLK_PLL_DIV) & DIV_DDR;
-   clk->rate = pll / (ctrl >> DIV_DDR_SHIFT);
-}
-
-static void dc_clk_init(struct clk *clk)
-{
-   u32 pll, ctrl;
-
-   pll = clk_get_rate(clk->parent);
-   ctrl = __raw_readl(LS1X_CLK_PLL_DIV) & DIV_DC;
-   clk->rate = pll / (ctrl >> DIV_DC_SHIFT);
-}
-
-static struct clk_ops pll_clk_ops = {
-   .init   = pll_clk_init,
-};
-
-static struct clk_ops cpu_clk_ops = {
-   .init   = cpu_clk_init,
-};
-
-static struct clk_ops ddr_clk_ops = {
-   .init   = ddr_clk_init,
-};
-
-static struct clk_ops dc_clk_ops = {
-   .init   = dc_clk_init,
-};
-
-static struct clk pll_clk = {

Re: [PATCH] i2c: tegra: Fix ifdefs for suspend mode

2012-08-18 Thread Mark Brown
On Sat, Aug 18, 2012 at 09:07:32AM +0200, Wolfram Sang wrote:
> On Mon, Jul 30, 2012 at 07:03:07PM +0530, Laxman Dewangan wrote:
> > CONFIG_PM covers runtime only PM.

> I am a bit confused by this description. CONFIG_PM_RUNTIME covers
> runtime PM, no?

The issue is that CONFIG_PM doesn't actually enable any of the PM
callbacks, it only allows you to enable CONFIG_PM_SLEEP and
CONFIG_PM_RUNTIME.  This means that if you use CONFIG_PM to protect your
system sleep callbacks they may end up unreferenced if only runtime PM
is enabled.

Personally I'd rather just uncondtionally enable PM rather than faff
around with all these ifdefs...


signature.asc
Description: Digital signature


[PATCH v2] clk: add Loongson1B clock support

2012-08-18 Thread Kelvin Cheung
This adds clock support to Loongson1B SoC using the common clock
infrastructure.

Signed-off-by: Kelvin Cheung 
---
 drivers/clk/Makefile   |1 +
 drivers/clk/clk-ls1x.c |  108 
 2 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 drivers/clk/clk-ls1x.c

diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 5869ea3..018ec57 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_ARCH_SOCFPGA)+= socfpga/
 obj-$(CONFIG_PLAT_SPEAR)   += spear/
 obj-$(CONFIG_ARCH_U300)+= clk-u300.o
 obj-$(CONFIG_ARCH_INTEGRATOR)  += versatile/
+obj-$(CONFIG_MACH_LOONGSON1)   += clk-ls1x.o
 
 # Chip specific
 obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
diff --git a/drivers/clk/clk-ls1x.c b/drivers/clk/clk-ls1x.c
new file mode 100644
index 000..ff12fc0
--- /dev/null
+++ b/drivers/clk/clk-ls1x.c
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2012 Zhang, Keguang 
+ *
+ * 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 the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#define OSC33
+
+static DEFINE_SPINLOCK(_lock);
+
+static int ls1x_pll_clk_enable(struct clk_hw *hw)
+{
+   return 0;
+}
+
+static void ls1x_pll_clk_disable(struct clk_hw *hw)
+{
+}
+
+static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
+unsigned long parent_rate)
+{
+   u32 pll, rate;
+
+   pll = __raw_readl(LS1X_CLK_PLL_FREQ);
+   rate = ((12 + (pll & 0x3f)) * 100) +
+   pll >> 8) & 0x3ff) * 100) >> 10);
+   rate *= OSC;
+   rate >>= 1;
+
+   return rate;
+}
+
+static const struct clk_ops ls1x_pll_clk_ops = {
+   .enable = ls1x_pll_clk_enable,
+   .disable = ls1x_pll_clk_disable,
+   .recalc_rate = ls1x_pll_recalc_rate,
+};
+
+static struct clk * __init clk_register_pll(struct device *dev,
+const char *name, const char *parent_name, unsigned long flags)
+{
+   struct clk_hw *hw;
+   struct clk *clk;
+   struct clk_init_data init;
+
+   /* allocate the divider */
+   hw = kzalloc(sizeof(struct clk_hw), GFP_KERNEL);
+   if (!hw) {
+   pr_err("%s: could not allocate clk_hw\n", __func__);
+   return ERR_PTR(-ENOMEM);
+   }
+
+   init.name = name;
+   init.ops = &ls1x_pll_clk_ops;
+   init.flags = flags | CLK_IS_BASIC;
+   init.parent_names = (parent_name ? &parent_name : NULL);
+   init.num_parents = (parent_name ? 1 : 0);
+   hw->init = &init;
+
+   /* register the clock */
+   clk = clk_register(dev, hw);
+
+   if (IS_ERR(clk))
+   kfree(hw);
+
+   return clk;
+}
+
+void __init ls1x_clk_init(void)
+{
+   struct clk *clk;
+
+   clk = clk_register_pll(NULL, "pll_clk", NULL, CLK_IS_ROOT);
+   clk_prepare_enable(clk);
+
+   clk = clk_register_divider(NULL, "cpu_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_CPU_SHIFT,
+   DIV_CPU_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "cpu", NULL);
+
+   clk = clk_register_divider(NULL, "ddr_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DDR_SHIFT,
+   DIV_DDR_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "ddr", NULL);
+   clk_register_clkdev(clk, "stmmaceth", NULL);
+
+   clk = clk_register_divider(NULL, "dc_clk", "pll_clk",
+   CLK_SET_RATE_PARENT, LS1X_CLK_PLL_DIV, DIV_DC_SHIFT,
+   DIV_DC_WIDTH, CLK_DIVIDER_ONE_BASED, &_lock);
+   clk_prepare_enable(clk);
+   clk_register_clkdev(clk, "dc", NULL);
+   clk_register_clkdev(clk, "serial8250", NULL);
+}
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] tcm_fc: rcu_deref outside rcu lock/unlock section

2012-08-18 Thread Denis Efremov
Use rcu_dereference_protected in order to prevent lockdep
complaint. Sequel of the patch 863555be

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Denis Efremov 
---
 drivers/target/tcm_fc/tfc_sess.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index 87901fa..3c9e5b5 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -456,7 +456,9 @@ static void ft_prlo(struct fc_rport_priv *rdata)
struct ft_tport *tport;
 
mutex_lock(&ft_lport_lock);
-   tport = rcu_dereference(rdata->local_port->prov[FC_TYPE_FCP]);
+   tport = rcu_dereference_protected(rdata->local_port->prov[FC_TYPE_FCP],
+ lockdep_is_held(&ft_lport_lock));
+
if (!tport) {
mutex_unlock(&ft_lport_lock);
return;
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] i2c: tegra: Fix ifdefs for suspend mode

2012-08-18 Thread Wolfram Sang
On Sat, Aug 18, 2012 at 01:01:38PM +0100, Mark Brown wrote:
> On Sat, Aug 18, 2012 at 09:07:32AM +0200, Wolfram Sang wrote:
> > On Mon, Jul 30, 2012 at 07:03:07PM +0530, Laxman Dewangan wrote:
> > > CONFIG_PM covers runtime only PM.
> 
> > I am a bit confused by this description. CONFIG_PM_RUNTIME covers
> > runtime PM, no?
> 
> The issue is that CONFIG_PM doesn't actually enable any of the PM
> callbacks, it only allows you to enable CONFIG_PM_SLEEP and
> CONFIG_PM_RUNTIME.  This means that if you use CONFIG_PM to protect your
> system sleep callbacks they may end up unreferenced if only runtime PM
> is enabled.

Thanks for the explanation!

Laxman, could you update the description to reflect that?

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH] i2c-i801: Add device tree support

2012-08-18 Thread Wolfram Sang
On Sat, Aug 18, 2012 at 01:17:45PM +0200, Thierry Reding wrote:
> On Sat, Aug 18, 2012 at 11:48:46AM +0200, Wolfram Sang wrote:
> > On Wed, Aug 08, 2012 at 09:06:47AM +0200, Thierry Reding wrote:
> > > This commit adds support for probing slave devices parsed from the
> > > device tree.
> > > 
> > > Signed-off-by: Thierry Reding 
> > 
> > How are the devicetree nodes of the slaves connected to this PCI device
> > which should not have a node itself?
> 
> The matching is done by pci_set_of_node() and pci_set_bus_of_node().
> The latter will eventually call pcibios_get_phb_of_node(). What makes
> you say that PCI devices shouldn't have nodes themselves?

I thought to recall that busses which can be probed at runtime should
not have nodes but should be probed. Maybe that was wrong. Can you point
me to a dts-file with an example?

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH] i2c-i801: Add device tree support

2012-08-18 Thread Thierry Reding
On Sat, Aug 18, 2012 at 02:16:28PM +0200, Wolfram Sang wrote:
> On Sat, Aug 18, 2012 at 01:17:45PM +0200, Thierry Reding wrote:
> > On Sat, Aug 18, 2012 at 11:48:46AM +0200, Wolfram Sang wrote:
> > > On Wed, Aug 08, 2012 at 09:06:47AM +0200, Thierry Reding wrote:
> > > > This commit adds support for probing slave devices parsed from the
> > > > device tree.
> > > > 
> > > > Signed-off-by: Thierry Reding 
> > > 
> > > How are the devicetree nodes of the slaves connected to this PCI device
> > > which should not have a node itself?
> > 
> > The matching is done by pci_set_of_node() and pci_set_bus_of_node().
> > The latter will eventually call pcibios_get_phb_of_node(). What makes
> > you say that PCI devices shouldn't have nodes themselves?
> 
> I thought to recall that busses which can be probed at runtime should
> not have nodes but should be probed. Maybe that was wrong. Can you point
> me to a dts-file with an example?

That approach doesn't work for I2C controllers, though because you
couldn't attach an slaves to them. The same goes for SPI controllers or
any other dumb busses that can't be probed.

arch/x86/platform/ce4100/falconfalls.dts is an example for an X86
platform where PCI devices have associated device tree nodes.

Thierry


pgpABsiuPtoPP.pgp
Description: PGP signature


[PATCH V2] i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP

2012-08-18 Thread Laxman Dewangan
The CONFIG_PM doesn't actually enable any of the PM callbacks, it
only allows to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME.
This means if CONFIG_PM is used to protect system sleep callbacks
then it may end up unreferenced if only runtime PM is enabled.
Hence protecting sleep callbacks with CONFIG_PM_SLEEP.

Signed-off-by: Laxman Dewangan 
---
This patch will remove the compilation warning if CONFIG_PM_SLEEP
is not enabled.

Change from V1 ->V2:
provide more details in description as per Mark's response.

 drivers/i2c/busses/i2c-tegra.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 66eb53f..9a08c57 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -712,7 +712,7 @@ static int __devexit tegra_i2c_remove(struct 
platform_device *pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int tegra_i2c_suspend(struct device *dev)
 {
struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);
-- 
1.7.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/7] HID: picoLCD updates

2012-08-18 Thread Bruno Prémont
Hi Jiri,

[CCing Alan Stern]

On Thu, 16 August 2012 Jiri Kosina  wrote:
> On Thu, 16 Aug 2012, Bruno Prémont wrote:
> 
> > > I don't really understand this explanation. Once usb_kill_urb() returns, 
> > > the URB should be available for future use (and therefore all queues 
> > > completely drained).
> > 
> > I won't have time today to check, though my guess is that on each
> > echo $usb-id > bind; echo $usb-id > unbind
> > under /sys/bus/hid/drivers/hid-picolcd/ the USB urb queue fills a bit does
> > not get cleared.
> > 
> > Is usb_kill_urb() called when unbinding just the specific hid driver? 
> 
> Yup, through hid_hw_stop() -> usbhid_stop().
> 
> > If so my short timing between bind/unbind must be triggering something 
> > else...
> > 
> > Otherwise I'm missing something as at first time I got no "output queue 
> > full"
> > messages, but as I repeated the bind/unbind sequences the prints per 
> > bind/unbind
> > iteration increased in number.
> > 
> > Anyhow, on Friday evening/week-end I will continue digging and report back 
> > with my
> > findings.

Huh, after changing some of the hid-picolcd data in order to have less racy
coupling between hid and framebuffer I'm now dying way too often in _mmx_memcpy
and most of the time I don't get a (complete) trace...

The only full trace I got was:
[ 3857.426136] BUG: unable to handle kernel paging request at dbdf9000
[ 3857.432555] IP: [] _mmx_memcpy+0x27/0x16c
[ 3857.435906] *pde = 1bebb063 *pte = 1bdf9161 
[ 3857.435906] Oops: 0003 [#1] 
[ 3857.435906] Modules linked in: hid_picolcd fb_sys_fops sysimgblt sysfillrect 
syscopyarea drm_kms_helper nfs3 nfs_acl nfs lockd sunrpc
[ 3857.435906] Pid: 1935, comm: bash Not tainted 
3.6.0-rc1-jupiter-00363-g0e8ccbc #1 NVIDIA Corporation. nFORCE-MCP/MS-6373
[ 3857.435906] EIP: 0060:[] EFLAGS: 00010013 CPU: 0
[ 3857.435906] EIP is at _mmx_memcpy+0x27/0x16c
[ 3857.435906] EAX: dd40a000 EBX: dd6ea010 ECX: 035af77b EDX: dbdf4230
[ 3857.435906] ESI: dbe0d1b0 EDI: dbdf9000 EBP: dd40bea8 ESP: dd40be8c
[ 3857.435906]  DS: 007b ES: 007b FS:  GS: 00e0 SS: 0068
[ 3857.435906] CR0: 8005003b CR2: dbdf9000 CR3: 1d7ee000 CR4: 07d0
[ 3857.435906] DR0:  DR1:  DR2:  DR3: 
[ 3857.435906] DR6: 0ff0 DR7: 0400
[ 3857.435906] Process bash (pid: 1935, ti=dd40a000 task=dcdb6120 
task.ti=dbce2000)
[ 3857.435906] Stack:
[ 3857.435906]  0d6d6d6f dd6eb49c dd40beb8 dbde0080 dd6ea010 dbde0080 dbd31010 
dd40bed0
[ 3857.435906]  c133b364   ddfaa0e0 dbd31010 dbdf4230 dd6ea010 
0046
[ 3857.435906]  dbd31010 dd40bef0 c133bea0  dbd0c3f0  dbd0c3f0 

[ 3857.435906] Call Trace:
[ 3857.435906]  [] hid_submit_out+0xa4/0x130
[ 3857.435906]  [] hid_irq_out+0xa0/0x100
[ 3857.435906]  [] usb_hcd_giveback_urb+0x4e/0x90
[ 3857.435906]  [] finish_urb+0xb2/0xf0
[ 3857.435906]  [] takeback_td+0x3d/0x100
[ 3857.435906]  [] dl_done_list+0x14f/0x180
[ 3857.435906]  [] ohci_irq+0x191/0x300
[ 3857.435906]  [] ? unmask_irq+0x20/0x20
[ 3857.435906]  [] usb_hcd_irq+0x1e/0x40
[ 3857.435906]  [] handle_irq_event_percpu+0x6d/0x1c0
[ 3857.435906]  [] ? unmask_irq+0x20/0x20
[ 3857.435906]  [] handle_irq_event+0x28/0x40
[ 3857.435906]  [] handle_fasteoi_irq+0x8a/0xe0
[ 3857.435906]   
[ 3857.435906]  [] ? do_IRQ+0x3a/0xb0
[ 3857.435906]  [] ? common_interrupt+0x30/0x38
[ 3857.435906]  [] ? __do_softirq+0x53/0x1c0
[ 3857.435906]  [] ? local_bh_enable_ip+0x80/0x80
[ 3857.435906]   
[ 3857.435906]  [] ? irq_exit+0x3e/0xa0
[ 3857.435906]  [] ? smp_apic_timer_interrupt+0x6e/0x80
[ 3857.435906]  [] ? apic_timer_interrupt+0x31/0x38
[ 3857.435906]  [] ? vprintk_emit+0x34a/0x390
[ 3857.435906]  [] ? printk+0x38/0x3a
[ 3857.435906]  [] ? picolcd_init_framebuffer+0x261/0x350 
[hid_picolcd]
[ 3857.435906]  [] ? picolcd_probe+0x3d1/0x5a0 [hid_picolcd]
[ 3857.435906]  [] ? hid_device_probe+0x67/0xf0
[ 3857.435906]  [] ? driver_sysfs_add+0x57/0x80
[ 3857.435906]  [] ? driver_probe_device+0xbd/0x1d0
[ 3857.435906]  [] ? hid_match_device+0x7b/0x90
[ 3857.435906]  [] ? driver_bind+0x75/0xd0
[ 3857.435906]  [] ? driver_unbind+0x90/0x90
[ 3857.435906]  [] ? drv_attr_store+0x27/0x30
[ 3857.435906]  [] ? sysfs_write_file+0xac/0xf0
[ 3857.435906]  [] ? vfs_write+0x9c/0x130
[ 3857.435906]  [] ? sys_dup3+0x11f/0x160
[ 3857.435906]  [] ? sysfs_poll+0x90/0x90
[ 3857.435906]  [] ? sys_write+0x3d/0x70
[ 3857.435906]  [] ? sysenter_do_call+0x12/0x26
[ 3857.435906] Code: 90 90 90 90 55 89 e5 57 56 89 d6 53 83 ec 10 89 45 f0 89 
4d e4 89 e0 25 00 e0 ff ff f7 40 14 00 ff ff 07 74 17 c1 e9 02 8b 7d f0  a5 
8b 4d e4 83 e1 03 74 02 f3 a4 e9 27 01 00 00 8b 45 1
[ 3857.435906] EIP: [] _mmx_memcpy+0x27/0x16c SS:ESP 0068:dd40be8c
[ 3857.435906] CR2: dbdf9000
[ 3857.435906] ---[ end trace 10ae520e65e3b763 ]---
[ 3857.435906] Kernel panic - not syncing: Fatal exception in interrupt

It happens around the time of calling
  device_create_file(dev, &dev_attr_fb_update_rate);
that is, after picolcd_fb_reset(data, 1) has returne

Re: [PATCH REBASE 1/2] i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20

2012-08-18 Thread Wolfram Sang
On Sat, Aug 18, 2012 at 12:32:34AM +0530, Laxman Dewangan wrote:
> Tegra20 i2c controller does not support the continue transfer
> which implements the I2C_M_NOSTART functionality of i2c
> protocol mangling.
> Removing the I2C_M_NOSTART functionality for Tegra20.
> 
> Signed-off-by: Laxman Dewangan 
> ---
> This is rebased on linux-next-20120816.
> 
>  drivers/i2c/busses/i2c-tegra.c |   73 +++
>  1 files changed, 58 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 7149625..554f713 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -27,6 +27,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  #include 
> @@ -114,6 +115,15 @@ enum msg_end_type {
>  };
>  
>  /**
> + * struct tegra_i2c_hw_feature : Different HW support on Tegra
> + * @has_continue_xfer_support: Continue transfer supports.
> + */
> +
> +struct tegra_i2c_hw_feature {
> + bool has_continue_xfer_support;
> +};
> +
> +/**
>   * struct tegra_i2c_dev  - per device i2c context
>   * @dev: device reference for power management
>   * @adapter: core i2c layer adapter information
> @@ -148,6 +158,7 @@ struct tegra_i2c_dev {
>   int msg_read;
>   unsigned long bus_clk_rate;
>   bool is_suspended;
> + bool has_continue_xfer_support;

I wonder if it makes sense to carry a pointer here to the
tegra_i2c_hw_feature in use instead of copying all entries by hand,
since they might get more and more.

>  };
>  
>  static void dvc_writel(struct tegra_i2c_dev *i2c_dev, u32 val, unsigned long 
> reg)
> @@ -563,7 +574,17 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, 
> struct i2c_msg msgs[],
>   if (i2c_dev->is_suspended)
>   return -EBUSY;
>  
> - clk_prepare_enable(i2c_dev->div_clk);
> + /* Support I2C_M_NOSTART only if HW support continue xfer. */
> + for (i = 0; i < num - 1; i++) {
> + if ((msgs[i + 1].flags & I2C_M_NOSTART) &&
> + !i2c_dev->has_continue_xfer_support) {
> + dev_err(i2c_dev->dev,
> + "mesg %d have illegal flag\n", i + 1);
> + return -EINVAL;
> + }
> + }

Drivers are requested to explicitly check for features of the I2C bus
(like M_NOSTART) before using them, so I'd skip this extra check.

> +
> + clk_prepare_enable(i2c_dev->clk);

From a glimpse, this change looks unrelated at least. Even wrong, no?

>   for (i = 0; i < num; i++) {
>   enum msg_end_type end_type = MSG_END_STOP;
>   if (i < (num - 1)) {
> @@ -582,8 +603,13 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, 
> struct i2c_msg msgs[],
>  
>  static u32 tegra_i2c_func(struct i2c_adapter *adap)
>  {
> - return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
> - I2C_FUNC_PROTOCOL_MANGLING | I2C_FUNC_NOSTART;
> + struct tegra_i2c_dev *i2c_dev = i2c_get_adapdata(adap);
> + u32 ret = I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
> + I2C_FUNC_PROTOCOL_MANGLING;
> +
> + if (i2c_dev->has_continue_xfer_support)
> + ret |= I2C_FUNC_NOSTART;
> + return ret;
>  }
>  
>  static const struct i2c_algorithm tegra_i2c_algo = {
> @@ -591,6 +617,25 @@ static const struct i2c_algorithm tegra_i2c_algo = {
>   .functionality  = tegra_i2c_func,
>  };
>  
> +static struct tegra_i2c_hw_feature tegra20_i2c_hw = {
> + .has_continue_xfer_support = false,
> +};
> +
> +static struct tegra_i2c_hw_feature tegra30_i2c_hw = {
> + .has_continue_xfer_support = true,
> +};
> +
> +#if defined(CONFIG_OF)
> +/* Match table for of_platform binding */
> +static const struct of_device_id tegra_i2c_of_match[] __devinitconst = {
> + { .compatible = "nvidia,tegra30-i2c", .data = &tegra30_i2c_hw, },
> + { .compatible = "nvidia,tegra20-i2c", .data = &tegra20_i2c_hw, },
> + { .compatible = "nvidia,tegra20-i2c-dvc", .data = &tegra20_i2c_hw, },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, tegra_i2c_of_match);
> +#endif
> +
>  static int __devinit tegra_i2c_probe(struct platform_device *pdev)
>  {
>   struct tegra_i2c_dev *i2c_dev;
> @@ -600,6 +645,7 @@ static int __devinit tegra_i2c_probe(struct 
> platform_device *pdev)
>   struct clk *fast_clk;
>   const unsigned int *prop;
>   void __iomem *base;
> + const struct tegra_i2c_hw_feature *hw = &tegra20_i2c_hw;
>   int irq;
>   int ret = 0;
>  
> @@ -659,11 +705,18 @@ static int __devinit tegra_i2c_probe(struct 
> platform_device *pdev)
>   i2c_dev->bus_clk_rate = be32_to_cpup(prop);
>   }
>  
> - if (pdev->dev.of_node)
> + if (pdev->dev.of_node) {
> + const struct of_device_id *match;
> + match = of_match_device(of_match_ptr(tegra_i2c_of_match),
> + &pdev->dev);
> + 

Re: 3.0+ NFS issues (bisected)

2012-08-18 Thread Michael Tokarev
On 18.08.2012 15:13, J. Bruce Fields wrote:
> On Sat, Aug 18, 2012 at 10:49:31AM +0400, Michael Tokarev wrote:
[]
>> Well.  What can I say?  With the change below applied (to 3.2 kernel
>> at least), I don't see any stalls or high CPU usage on the server
>> anymore.  It survived several multi-gigabyte transfers, for several
>> hours, without any problem.  So it is a good step forward ;)
>>
>> But the whole thing seems to be quite a bit fragile.  I tried to follow
>> the logic in there, and the thing is quite a bit, well, "twisted", and
>> somewhat difficult to follow.  So I don't know if this is the right
>> fix or not.  At least it works! :)
> 
> Suggestions welcomed.

Ok...

Meanwhile, you can add my
Tested-By: Michael Tokarev 

to the patch.

>> And I really wonder why no one else reported this problem before.
>> Is me the only one in this world who uses linux nfsd? :)
> 
> This, for example:
> 
>   http://marc.info/?l=linux-nfs&m=134131915612287&w=2
> 
> may well describe the same problem  It just needed some debugging
> persistence, thanks!

Ah.  I tried to find something when I initially
sent this report, but weren't able to.  Apparently
I'm not alone with this problem indeed!

Thank you for all the work!

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH REBASE 1/2] i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20

2012-08-18 Thread Laxman Dewangan

Thanks for review.

On Saturday 18 August 2012 06:17 PM, Wolfram Sang wrote:

* PGP Signed by an unknown key

On Sat, Aug 18, 2012 at 12:32:34AM +0530, Laxman Dewangan wrote:

+   bool has_continue_xfer_support;

I wonder if it makes sense to carry a pointer here to the
tegra_i2c_hw_feature in use instead of copying all entries by hand,
since they might get more and more.



Ok, we can store the hw pointer in device structure. I will send the new 
patch.



  };

  static void dvc_writel(struct tegra_i2c_dev *i2c_dev, u32 val, unsigned long 
reg)
@@ -563,7 +574,17 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, struct 
i2c_msg msgs[],
if (i2c_dev->is_suspended)
return -EBUSY;

-   clk_prepare_enable(i2c_dev->div_clk);
+   /* Support I2C_M_NOSTART only if HW support continue xfer. */
+   for (i = 0; i<  num - 1; i++) {
+   if ((msgs[i + 1].flags&  I2C_M_NOSTART)&&
+   !i2c_dev->has_continue_xfer_support) {
+   dev_err(i2c_dev->dev,
+   "mesg %d have illegal flag\n", i + 1);
+   return -EINVAL;
+   }
+   }

Drivers are requested to explicitly check for features of the I2C bus
(like M_NOSTART) before using them, so I'd skip this extra check.



Ok, I kept this as part of flag checking so illegal flag should not be 
passed. I will remove this on next version patch.



+
+   clk_prepare_enable(i2c_dev->clk);

 From a glimpse, this change looks unrelated at least. Even wrong, no?



It was already there, just before above check. Due to insertion of 
check, this code shifted, otherwise it is not a new code.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] m68k/apollo: Remove disabled definitions in apollohw.h

2012-08-18 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
---
 arch/m68k/include/asm/apollohw.h |   12 
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/m68k/include/asm/apollohw.h b/arch/m68k/include/asm/apollohw.h
index 635ef4f..6c19e0c 100644
--- a/arch/m68k/include/asm/apollohw.h
+++ b/arch/m68k/include/asm/apollohw.h
@@ -46,18 +46,6 @@ struct SCN2681 {
 
 };
 
-#if 0
-struct mc146818 {
-
-   unsigned int second1:4, second2:4, alarm_second1:4, alarm_second2:4,
-minute1:4, minute2:4, alarm_minute1:4, alarm_minute2:4;
-   unsigned int hours1:4, hours2:4, alarm_hours1:4, alarm_hours2:4,
-day_of_week1:4, day_of_week2:4, day_of_month1:4, 
day_of_month2:4;
-   unsigned int month1:4, month2:4, year1:4, year2:4, :16;
-
-};
-#endif
-
 struct mc146818 {
 unsigned char second, alarm_second;
 unsigned char minute, alarm_minute;
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/7] HID: picoLCD updates

2012-08-18 Thread Alan Stern
On Sat, 18 Aug 2012, Bruno Prémont wrote:

> Hi Jiri,
> 
> [CCing Alan Stern]
> 
> On Thu, 16 August 2012 Jiri Kosina  wrote:
> > On Thu, 16 Aug 2012, Bruno Prémont wrote:
> > 
> > > > I don't really understand this explanation. Once usb_kill_urb() 
> > > > returns, 
> > > > the URB should be available for future use (and therefore all queues 
> > > > completely drained).
> > > 
> > > I won't have time today to check, though my guess is that on each
> > > echo $usb-id > bind; echo $usb-id > unbind
> > > under /sys/bus/hid/drivers/hid-picolcd/ the USB urb queue fills a bit does
> > > not get cleared.
> > > 
> > > Is usb_kill_urb() called when unbinding just the specific hid driver? 
> > 
> > Yup, through hid_hw_stop() -> usbhid_stop().
> > 
> > > If so my short timing between bind/unbind must be triggering something 
> > > else...
> > > 
> > > Otherwise I'm missing something as at first time I got no "output queue 
> > > full"
> > > messages, but as I repeated the bind/unbind sequences the prints per 
> > > bind/unbind
> > > iteration increased in number.
> > > 
> > > Anyhow, on Friday evening/week-end I will continue digging and report 
> > > back with my
> > > findings.
> 
> Huh, after changing some of the hid-picolcd data in order to have less racy
> coupling between hid and framebuffer I'm now dying way too often in 
> _mmx_memcpy
> and most of the time I don't get a (complete) trace...

There was a similar problem reported recently.  It turned out to be 
caused by a __devinitconst annotation attached to a usb_device_id 
table.

If there are any __devinit* annotations in the hid-picolcd driver, you 
should see if removing them helps.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] m68k: Use PTR_RET rather than if(IS_ERR(.. [1]

2012-08-18 Thread Geert Uytterhoeven
Thanks, applied and queued for 3.7.

On Mon, Aug 6, 2012 at 7:51 PM, Thomas Meyer  wrote:
> The semantic patch that makes this change is available
> in scripts/coccinelle/api/ptr_ret.cocci.
>
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/
>
> Signed-off-by: Thomas Meyer 
> ---
>
> diff -u -p a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
> --- a/arch/m68k/kernel/time.c
> +++ b/arch/m68k/kernel/time.c
> @@ -100,10 +100,7 @@ static int __init rtc_init(void)
> return -ENODEV;
>
> pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
> -   if (IS_ERR(pdev))
> -   return PTR_ERR(pdev);
> -
> -   return 0;
> +   return PTR_RET(pdev);
>  }
>
>  module_init(rtc_init);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] m68k: Use PTR_RET rather than if(IS_ERR(.. [2]

2012-08-18 Thread Geert Uytterhoeven
Thanks, applied and queued for 3.7.

On Mon, Aug 6, 2012 at 7:51 PM, Thomas Meyer  wrote:
> The semantic patch that makes this change is available
> in scripts/coccinelle/api/ptr_ret.cocci.
>
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/
>
> Signed-off-by: Thomas Meyer 
> ---
>
> diff -u -p a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
> --- a/arch/m68k/q40/config.c
> +++ b/arch/m68k/q40/config.c
> @@ -338,9 +338,6 @@ static __init int q40_add_kbd_device(voi
> return -ENODEV;
>
> pdev = platform_device_register_simple("q40kbd", -1, NULL, 0);
> -   if (IS_ERR(pdev))
> -   return PTR_ERR(pdev);
> -
> -   return 0;
> +   return PTR_RET(pdev);
>  }
>  arch_initcall(q40_add_kbd_device);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] m68k: amig: Use PTR_RET rather than if(IS_ERR(.. [1]

2012-08-18 Thread Geert Uytterhoeven
Thanks, applied and queued for 3.7.

On Mon, Aug 6, 2012 at 7:51 PM, Thomas Meyer  wrote:
> The semantic patch that makes this change is available
> in scripts/coccinelle/api/ptr_ret.cocci.
>
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/
>
> Signed-off-by: Thomas Meyer 
> ---
>
> diff -u -p a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c
> --- a/arch/m68k/amiga/platform.c
> +++ b/arch/m68k/amiga/platform.c
> @@ -56,10 +56,7 @@ static int __init amiga_init_bus(void)
> n = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2;
> pdev = platform_device_register_simple("amiga-zorro", -1,
>zorro_resources, n);
> -   if (IS_ERR(pdev))
> -   return PTR_ERR(pdev);
> -
> -   return 0;
> +   return PTR_RET(pdev);
>  }
>
>  subsys_initcall(amiga_init_bus);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/4] fat: fix ESTALE errors

2012-08-18 Thread Al Viro
On Sat, Aug 18, 2012 at 05:41:39AM -0400, Namjae Jeon wrote:
> From: Namjae Jeon 
> 
> This patch-set eliminates the client side ESTALE errors when
> a FAT partition exported over NFS has its dentries evicted 
> from the cache.
> 
> One of the reasons for this error is lack of permanent inode 
> numbers on FAT which makes it difficult to construct persistent 
> file handles.This can be overcome by using the on-disk location
> of the directory entries (i_pos) as the inode number.

The hell it can.  You've just made them unstable on rename(2).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-18 Thread Rafael J. Wysocki
On Saturday, August 18, 2012, Ming Lei wrote:
> On Sat, Aug 18, 2012 at 6:02 AM, Rafael J. Wysocki  wrote:
> > On Friday, August 17, 2012, Ming Lei wrote:
> >> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *))
> >
> > Is this function actually used more than once?
> 
> At least now, it is called each time before system sleep.

My question was about the number of current users of it.  Sorry for not
being clear.

If there are no more anticipated users than the current only one, please
drop the unused (void *) argument.  We can always extend it in the future
if need be and for now passing that NULL every time is just pointless.

And please fold [2/3] into [3/3] in this series.

I'm not particuarly fond of this patch, but I guess it would require some
consderable juggling of #ifdefs to fix the build breakage in a different way.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] efi: add efi_runtime state checking

2012-08-18 Thread Matt Fleming
On Tue, 2012-08-14 at 17:51 -0700, H. Peter Anvin wrote:
> On 06/28/2012 10:02 AM, Olof Johansson wrote:
> > On Wed, Jun 27, 2012 at 2:52 PM, H. Peter Anvin  wrote:
> >> On 06/27/2012 02:35 PM, Olof Johansson wrote:
> >>>
> >>> This adds an efi_runtime variable indicating whether the
> >>> efi runtime services are available. The only time they are
> >>> expected to not be available is when a 32-bit kernel has been
> >>> booted using 64-but EFI and vice versa.
> >>>
> >>> It also adds checking to the two locations where functions are
> >>> called; x86 reboot and efivars.
> >>>
> >>
> >> OK, stupid question:
> >>
> >> Why is this different from the efi_enabled variable, or rather: why is it
> >> different from what the efi_enabled variable *should* be?  If runtime
> >> services aren't available the only "EFI" that is available to the kernel 
> >> are
> >> the data structures passed in, and those can be checked directly...
> >
> > Excellent question, and I think it would work to turn off efi_enabled
> > towards the end of setup_arch() for non-native boots. That'd solve all
> > these problems, I believe.
> >
> > I'll try it out and revise this patch. It might take me a day or two
> > to get cycles for it.
> >
> 
> Ping?

There's now a bugzilla report for tracking this,

https://bugzilla.kernel.org/show_bug.cgi?id=45991



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Build regressions/improvements in v3.6-rc2

2012-08-18 Thread Geert Uytterhoeven
On Sat, 18 Aug 2012, Geert Uytterhoeven wrote:
> JFYI, when comparing v3.6-rc2 to v3.6-rc1[3], the summaries are:
>   - build errors: +4/-6

  + arch/sh/lib/mcount.S: Error: pcrel too far:  => 89

sh-allyesconfig

  + drivers/input/touchscreen/eeti_ts.c: error: implicit declaration of 
function 'gpio_free' [-Werror=implicit-function-declaration]:  => 243:2
  + drivers/input/touchscreen/eeti_ts.c: error: implicit declaration of 
function 'gpio_request_one' [-Werror=implicit-function-declaration]:  => 205:2

xtensa-allmodconfig

  + error: No rule to make target 
/scratch/kisskb/build/linus_m68k-allmodconfig_m68k/usr/include/linux/kvm_para.h:
  => N/A

Known issue with kvm_para.h header export

> [1] http://kisskb.ellerman.id.au/kisskb/head/5338/ (all 116 configs)
> [3] http://kisskb.ellerman.id.au/kisskb/head/5315/ (all 116 configs)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/7] HID: picoLCD updates

2012-08-18 Thread Bruno Prémont
On Sat, 18 August 2012 Alan Stern  wrote:
> On Sat, 18 Aug 2012, Bruno Prémont wrote:
> > On Thu, 16 August 2012 Jiri Kosina  wrote:
> > > On Thu, 16 Aug 2012, Bruno Prémont wrote:
> > > 
> > > > > I don't really understand this explanation. Once usb_kill_urb() 
> > > > > returns, 
> > > > > the URB should be available for future use (and therefore all queues 
> > > > > completely drained).
> > > > 
> > > > I won't have time today to check, though my guess is that on each
> > > > echo $usb-id > bind; echo $usb-id > unbind
> > > > under /sys/bus/hid/drivers/hid-picolcd/ the USB urb queue fills a bit 
> > > > does
> > > > not get cleared.
> > > > 
> > > > Is usb_kill_urb() called when unbinding just the specific hid driver? 
> > > 
> > > Yup, through hid_hw_stop() -> usbhid_stop().
> > > 
> > > > If so my short timing between bind/unbind must be triggering something 
> > > > else...
> > > > 
> > > > Otherwise I'm missing something as at first time I got no "output queue 
> > > > full"
> > > > messages, but as I repeated the bind/unbind sequences the prints per 
> > > > bind/unbind
> > > > iteration increased in number.
> > > > 
> > > > Anyhow, on Friday evening/week-end I will continue digging and report 
> > > > back with my
> > > > findings.
> > 
> > Huh, after changing some of the hid-picolcd data in order to have less racy
> > coupling between hid and framebuffer I'm now dying way too often in 
> > _mmx_memcpy
> > and most of the time I don't get a (complete) trace...
> 
> There was a similar problem reported recently.  It turned out to be 
> caused by a __devinitconst annotation attached to a usb_device_id 
> table.
> 
> If there are any __devinit* annotations in the hid-picolcd driver, you 
> should see if removing them helps.

There is no such annotation around in hid-picolcd.


One thing I just though about, how does usbhid handle the calls to
usbhid_submit_report() when hid_hw_stop()/hid_hw_close() have already
been called?
I will attempt to see if it makes a difference to shortcut my
usbhid_submit_report() calls from the point on I have called hid_hw_close()...

Bruno
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Search for patch for kernel stack disclosure in binfmt_script during execve

2012-08-18 Thread halfdog
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm searching for a patch for linux kernel stack disclosure in
binfmt_script with crafted interpreter names when CONFIG_MODULES is
active (see [1]).

The simplest solution would be to return an error in load_script (from
fs/binfmt_script.c). when maximal recursion depth is reached, but I'm
not sure, if that is nice and could have any side effects. Apart from
that, some change in the loop condition in search_binary_handler (from
fs/exec.c) could have side effects hard to see and hence reintroduce
the bug (challenge to get that right in documentation).


Any comments?

- --- fs/binfmt_script.c  2012-01-19 23:04:48.0 +
+++ fs/binfmt_script.c2012-08-18 13:55:25.735748407 +
@@ -22,9 +22,8 @@
char interp[BINPRM_BUF_SIZE];
int retval;

- -   if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') ||
- -   (bprm->recursion_depth > BINPRM_MAX_RECURSION))
- -   return -ENOEXEC;
+   if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) return
- -ENOEXEC;
+if (bprm->recursion_depth > BINPRM_MAX_RECURSION) return -ENOMEM;
/*
 * This section does the #! interpretation.
 * Sorta complicated, but hopefully it will work.  -TYT

hd

[1]
http://www.halfdog.net/Security/2012/LinuxKernelBinfmtScriptStackDataDisclosure/

- -- 
http://www.halfdog.net/
PGP: 156A AE98 B91F 0114 FE88  2BD8 C459 9386 feed a bee
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlAvn0MACgkQxFmThv7tq+6nUACfdk7KWESuC6J1FXZcrMaa3kCb
eWoAn0wV6INdYGjAZydd6ytO0i5BnhGa
=cxbR
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Status of adaptive tickless patchset as of august 2012

2012-08-18 Thread Frederic Weisbecker
Hi,

I started working on the adaptive nohz patchset by the end of 2010. Since then, 
I
iterated through one big branch:

- Nohz tasks (https://lwn.net/Articles/420490/)
- Nohz cpusets (https://lwn.net/Articles/455044/)
- Nohz cpusets v2 (https://lwn.net/Articles/487599/)
- Nohz cpusets v3 (https://lwn.net/Articles/495422/)

It quickly grew up to more than 40 patches. And still the full support
(ie: handle everything that the tick maintains, but without the tick) wasn't
yet finished.

And the more I was progressing to get this full support, the more I had patches 
to
maintain, rebase, improve, etc...

Some side effects went to increase:

- I had deep reviews about the core overall design in the first iterations. 
Thanks
to that I made nice progresses. But as the patchset grew, I got less reviews 
about
overall design but more about details. And I can totally understand that. Huge 
pile
of patches certainly don't encourage reviews.

- Lacking reviews on the overall design, I was feeling more and more 
uncomfortable about
whatever I was improving or whichever feature I was adding on top of the 
existing ones.
And I was indeed digging on some wrong direction for some parts.

- I was spending too much time in out-of-tree maintainance while my goal is to 
get this
upstream.

All in one, this big branch neither scaled in term of reviews nor development.

So I decided, after Ingo proposed me to set a tree in -tip, to cut all of the 
things the
tick is handling and isolate each of these into single separate topics and 
handle them
individually or at least iteratively, trying to push the things upstream or in 
a staging
tree in -tip piecewise. As long as this is carried by concerned maintainers and 
I can get
their insights on a regular basis. And also as long as we can iterate to some 
central branch
because, even if we can cut out things into individual topics, there are 
significant interdependencies.

I think this has been successfull so far:

- The detection of illegal RCU read side critical sections under RCU extended 
quiescent
state is now upstream. This even helped finding lot of bugs upstream.

- State of user as RCU extended quiescent state is currently pending in Paul's 
tree
in the rcu/idle branch. It's also in linux-next. This may likely go upstream or 
in
a staging branch in -tip for the next merge window.

- Some preparatory work to split nohz and idle logic in nohz API. It went 
upstream
on the last merge window.

- Proposed something to handle nohz cputime accounting: 
https://lwn.net/Articles/501766/
Got fundamental reviews that pointed me to rather reuse virtual based cputime 
accounting.

- Consolidated/cleaned up virtual based cputime accounting (last version is
https://lkml.org/lkml/2012/8/17/326 and waits for inclusion in -tip or so.)

- On top of that vtime consolidation and the RCU pending patches, propose
a generic virtual cputime accounting for archs that don't have 
CONFIG_VTIME_CPU_ACCOUNTING.
See http://comments.gmane.org/gmane.linux.kernel/1337690
A tickless CPU can then account cputime with that.

So the process seem to be in a better direction now. Summer holidays have 
naturally made it a
bit smoother and the rythm will probably stay that way until the end of 
ksummit/linuxcon/LPC. But
I have the feeling we are moving forward.

No schedule plans, but once I get the above topics sorted out, I'll probably 
work on timekeeping
handling in adaptive tickless CPUs. And then the rest...

I'll still keep maintaining the big branch in my tree. But this is now going to 
be rather a big draft or
laboratory, with regular rebases on what is merged upstream or in maintainers 
tree. It helps me to
keep a practical view of the big picture.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/4] fat: fix ESTALE errors

2012-08-18 Thread OGAWA Hirofumi
Al Viro  writes:

> On Sat, Aug 18, 2012 at 05:41:39AM -0400, Namjae Jeon wrote:
>> From: Namjae Jeon 
>> 
>> This patch-set eliminates the client side ESTALE errors when
>> a FAT partition exported over NFS has its dentries evicted 
>> from the cache.
>> 
>> One of the reasons for this error is lack of permanent inode 
>> numbers on FAT which makes it difficult to construct persistent 
>> file handles.This can be overcome by using the on-disk location
>> of the directory entries (i_pos) as the inode number.
>
> The hell it can.  You've just made them unstable on rename(2).

As more hint. We can't use i_pos as the inode number.

E.g. inode is unlinked but is still opened (orphaned inode), the dir
entry is free and you can create the inode on same i_pos. After that,
both inodes have same i_pos (so inode number).

Thanks.
-- 
OGAWA Hirofumi 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [discussion]sched: a rough proposal to enable power saving in scheduler

2012-08-18 Thread Luming Yu
On Sat, Aug 18, 2012 at 4:16 AM, Chris Friesen
 wrote:
> On 08/17/2012 01:50 PM, Matthew Garrett wrote:
>>
>> On Fri, Aug 17, 2012 at 01:45:09PM -0600, Chris Friesen wrote:
>>>
>>> On 08/17/2012 12:47 PM, Matthew Garrett wrote:
>>
>>
>>> The datasheet for the Xeon E5 (my variant at least) says it doesn't
>>> do C7 so never powers down the LLC.  However, as you said earlier
>>> once you can put the socket into C6 which saves about 30W compared
>>> to C1E.
>>>
>>> So as far as I can see with this CPU at least you would benefit from
>>> shutting down a whole socket when possible.
>>
>>
>> Having any active cores on the system prevents all packages from going
>> into PC6 or deeper. What I'm not clear on is whether less deep package C
>> states are also blocked.
>>
>
> Right, we need the memory controller.
>
> The E5 datasheet is a bit ambiguous, it reads:
>
>
> A processor enters the package C3 low power state when:
>  -At least one core is in the C3 state.
>  -The other cores are in a C3 or lower power state, and the processor has
> been granted permission by the platform.
>
>
> Unfortunately it doesn't specify whether that is the other cores in the
> package, or the other cores on the whole system.
>

Hardware limitations is just part of the problem. We could find them
out from various white papers or data sheets, or test out.To me, the
key problem in terms of power and performance balancing still lies in
CPU and memory allocation method.  For example, on a system we can
benefit from shutting down a whole socket when possible, if a workload
allocates 50% CPU cycles and 50% memory bandwidth and space on a two
socket system(modern), an ideal allocation method ( I assume it's our
goal of the discussion) should leave CPU, cache, memory controller and
memory on one socket ( node) completely idle and in deepest power
saving mode. But obviously, we need to spread as much as possible
across all cores in another socket(to race to idle). So from the
example above, we see a threshold that we need to reference before
selecting one from two complete different policy: spread or not
spread... As long as there is hardware limitation, we could always
need knob like that referenced threshold to adapt on different
hardware in one kernel

/l
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Status of adaptive tickless patchset as of august 2012

2012-08-18 Thread Paul E. McKenney
On Sat, Aug 18, 2012 at 04:02:51PM +0200, Frederic Weisbecker wrote:
> Hi,
> 
> I started working on the adaptive nohz patchset by the end of 2010. Since 
> then, I
> iterated through one big branch:
> 
> - Nohz tasks (https://lwn.net/Articles/420490/)
> - Nohz cpusets (https://lwn.net/Articles/455044/)
> - Nohz cpusets v2 (https://lwn.net/Articles/487599/)
> - Nohz cpusets v3 (https://lwn.net/Articles/495422/)
> 
> It quickly grew up to more than 40 patches. And still the full support
> (ie: handle everything that the tick maintains, but without the tick) wasn't
> yet finished.
> 
> And the more I was progressing to get this full support, the more I had 
> patches to
> maintain, rebase, improve, etc...
> 
> Some side effects went to increase:
> 
> - I had deep reviews about the core overall design in the first iterations. 
> Thanks
> to that I made nice progresses. But as the patchset grew, I got less reviews 
> about
> overall design but more about details. And I can totally understand that. 
> Huge pile
> of patches certainly don't encourage reviews.
> 
> - Lacking reviews on the overall design, I was feeling more and more 
> uncomfortable about
> whatever I was improving or whichever feature I was adding on top of the 
> existing ones.
> And I was indeed digging on some wrong direction for some parts.
> 
> - I was spending too much time in out-of-tree maintainance while my goal is 
> to get this
> upstream.
> 
> All in one, this big branch neither scaled in term of reviews nor development.
> 
> So I decided, after Ingo proposed me to set a tree in -tip, to cut all of the 
> things the
> tick is handling and isolate each of these into single separate topics and 
> handle them
> individually or at least iteratively, trying to push the things upstream or 
> in a staging
> tree in -tip piecewise. As long as this is carried by concerned maintainers 
> and I can get
> their insights on a regular basis. And also as long as we can iterate to some 
> central branch
> because, even if we can cut out things into individual topics, there are 
> significant interdependencies.
> 
> I think this has been successfull so far:
> 
> - The detection of illegal RCU read side critical sections under RCU extended 
> quiescent
> state is now upstream. This even helped finding lot of bugs upstream.
> 
> - State of user as RCU extended quiescent state is currently pending in 
> Paul's tree
> in the rcu/idle branch. It's also in linux-next. This may likely go upstream 
> or in
> a staging branch in -tip for the next merge window.

Indeed, the current plan is to push it for 3.7.  ;-)

Thanx, Paul

> - Some preparatory work to split nohz and idle logic in nohz API. It went 
> upstream
> on the last merge window.
> 
> - Proposed something to handle nohz cputime accounting: 
> https://lwn.net/Articles/501766/
> Got fundamental reviews that pointed me to rather reuse virtual based cputime 
> accounting.
> 
> - Consolidated/cleaned up virtual based cputime accounting (last version is
> https://lkml.org/lkml/2012/8/17/326 and waits for inclusion in -tip or so.)
> 
> - On top of that vtime consolidation and the RCU pending patches, propose
> a generic virtual cputime accounting for archs that don't have 
> CONFIG_VTIME_CPU_ACCOUNTING.
> See http://comments.gmane.org/gmane.linux.kernel/1337690
> A tickless CPU can then account cputime with that.
> 
> So the process seem to be in a better direction now. Summer holidays have 
> naturally made it a
> bit smoother and the rythm will probably stay that way until the end of 
> ksummit/linuxcon/LPC. But
> I have the feeling we are moving forward.
> 
> No schedule plans, but once I get the above topics sorted out, I'll probably 
> work on timekeeping
> handling in adaptive tickless CPUs. And then the rest...
> 
> I'll still keep maintaining the big branch in my tree. But this is now going 
> to be rather a big draft or
> laboratory, with regular rebases on what is merged upstream or in maintainers 
> tree. It helps me to
> keep a practical view of the big picture.
> 
> Thanks.
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-18 Thread Ming Lei
On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki  wrote:
>
> My question was about the number of current users of it.  Sorry for not
> being clear.

Sorry for misunderstanding your question.

>
> If there are no more anticipated users than the current only one, please
> drop the unused (void *) argument.  We can always extend it in the future
> if need be and for now passing that NULL every time is just pointless.

One usage is to get statistics info about devices for debug purpose,
so the parameter is needed to return something.

> And please fold [2/3] into [3/3] in this series.

IMO, it is better to split them to avoid coupling between fw loader and
device PM.

Looks you agreed on the patch, and Greg has added the
patch into his driver-core next tree to fix -next build failure, so could
you just let them be that?

>
> I'm not particuarly fond of this patch, but I guess it would require some
> consderable juggling of #ifdefs to fix the build breakage in a different way.

Firmware loader might be built as module, so without exporting something
from device PM core, the problem can't be fixed.


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [discussion]sched: a rough proposal to enable power saving in scheduler

2012-08-18 Thread Arjan van de Ven
On 8/18/2012 7:33 AM, Luming Yu wrote:
> saving mode. But obviously, we need to spread as much as possible
> across all cores in another socket(to race to idle). So from the
> example above, we see a threshold that we need to reference before
> selecting one from two complete different policy: spread or not
> spread... As long as there is hardware limitation, we could always
> need knob like that referenced threshold to adapt on different
> hardware in one kernel

I think the physics are slightly simpler, if you abstract it one level.

every reasonable system out there has things that can be off if all cores are 
in the deep power state,
that have to be on if even one of them is alive. On "big core" Intel, that's 
uncore and memory controller,
on small core (atom/phone) Intel that is the chipset fabric only. On ARM it 
might be something else. On all of
them it's some clocks, PLLs, voltage regulators etc etc.

not all chips are advanced enough to aggressively these things off when they 
could, but most are nowadays.

so in abstract, there's a power offset that gets you from 0 to 1, Lets call 
this P0
there is also a power offset to go from 1 to 2, but that's smaller than 0->1. 
Lets call this Pc

or rather, 0->1 has the same kind of offset as 1->2 plus some extra offset.. so 
P0 = Pbase + Pc

there's also an energy cost for waking a cpu up (and letting it go back to 
sleep afterwards)... call it Ewake

so the abstract question is
you're running a task A on cpu 0
you want to also run a task B, which you estimate to run for time T

it's more energy efficient to wake a 2nd cpu if

Ewake < T * Pbase

(this assumes all cores are the same, you get a more complex formula if that's 
not the case, where T is even core specific)


there is no hardware policy *switch* in such formula, only parameters.
If Pbase = 0 (e.g. your hardware has no extra power savings), then the formula 
very naturally leads to one extreme of the behavior
if Ewake is very high, then it leads to the other extreme.

The only other variable is the user preference between power and performance 
balance.. but that's a pure preference, not hardware
specific anymore.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-08-18 Thread Russell King - ARM Linux
Okay, so EPROBE_DEFER seems to work when I build everything into the
kernel, but when I build a pile of ASoC drivers as modules, it fails
every time I've tried booting the platform so far.

This is a v3.5 based kernel, with preempt enabled.

Okay, what I have is a bunch of devices already pre-registered in the
system:

kirkwood-spdif-audio.1 (requiring module snd_soc_kirkwood_spdif)
kirkwood-i2s.1 (requiring module snd_soc_kirkwood_i2s)
kirkwood-pcm-audio.1 (requiring module snd_soc_kirkwood)
spdif-dit (requiring module snd_soc_spdif)

and the modules were loaded in this order:

Module  Size  Used by
snd_soc_spdif   1020  0 (spdif-dit driver)
dove   24577  1 (dove-drm driver)
snd_soc_kirkwood_i2s 5209  0(kirkwood-i2s driver)
snd_soc_kirkwood3629  0 (kirkwood-pcm-audio driver)
snd_soc_kirkwood_spdif 1449  0  (kirkwood-spdif-audio driver)

snd_soc_kirkwood_spdif will return -EPROBE_DEFER if it can't find the
devices registered into ASoC by the other three modules (referred to as
the CPU DAI, and Codec DAI).

What I see in the debugging is this (I've added some to increase the
debuggability):

bus: 'platform': add driver kirkwood-spdif-audio
bus: 'platform': driver_probe_device: matched device kirkwood-spdif-audio.1 
with driver kirkwood-spdif-audio
bus: 'platform': really_probe: probing driver kirkwood-spdif-audio with device 
kirkwood-spdif-audio.1
kirkwood-spdif-audio kirkwood-spdif-audio.1: CPU DAI kirkwood-i2s.1 not 
registered
bus: 'platform': add driver kirkwood-pcm-audio
bus: 'platform': add driver kirkwood-i2s
kirkwood-spdif-audio kirkwood-spdif-audio.1: failed to register card
bus: 'platform': add driver dove-drm
platform kirkwood-spdif-audio.1: Driver kirkwood-spdif-audio requests probe 
deferral
platform kirkwood-spdif-audio.1: Added to deferred list
bus: 'platform': driver_probe_device: matched device kirkwood-pcm-audio.1 with 
driver kirkwood-pcm-audio
bus: 'platform': really_probe: probing driver kirkwood-pcm-audio with device 
kirkwood-pcm-audio.1
driver: 'kirkwood-pcm-audio.1': driver_bound: bound to device 
'kirkwood-pcm-audio'
bus: 'platform': really_probe: bound device kirkwood-pcm-audio.1 to driver 
kirkwood-pcm-audio
platform kirkwood-spdif-audio.1: Retrying from deferred list
bus: device_attach 'kirkwood-spdif-audio.1' unbound
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'dove-temp'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'galcore'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'alarmtimer'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'mv_xor_shared'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'mv_xor'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'serial8250'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'sata_mv'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'orion_spi'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'mv643xx_eth'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'mv643xx_eth_port'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'ap510-vmeta'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'orion-ehci'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'rtc-mv'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'mv64xxx_i2c'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'gpio-rc-recv'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'sdhci-pxav2'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'sdhci-dove'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'leds-gpio'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'snd-soc-dummy'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'soc-audio'
bus: __device_attach 'kirkwood-spdif-audio.1' probing with 'kirkwood-pcm-audio'

What you notice here is that the kirkwood-spdif-audio driver has gone
missing - it hasn't been unloaded, and it still appears in sysfs, and
it can still be cleanly unloaded and reloaded.

bus: 'platform': driver_probe_device: matched device kirkwood-i2s.1 with driver 
kirkwood-i2s
bus: 'platform': really_probe: probing driver kirkwood-i2s with device 
kirkwood-i2s.1
kirkwood-i2s kirkwood-i2s.1: found external clock
driver: 'kirkwood-i2s.1': driver_bound: bound to device 'kirkwood-i2s'
bus: 'platform': really_probe: bound device kirkwood-i2s.1 to driver 
kirkwood-i2s
bus: 'platform': driver_probe_device: matched device dove-drm with driver 
dove-drm
bus: 'platform': really_probe: probing driver dove-drm with device dove-drm
bus: 'platform': add driver spdif-dit
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] No driver support for vblank timestamp query.
fb0: dove-drmfb frame buffer device
drm: registered panic notifier
[drm] Initialized dove-drm 1.0.0 20120730 on minor 0
driver: 'dove-drm': driver_bound: bound to device 'dove-drm'
bus

[PATCH 1/2] tty: serial: Check return code of gpiochip_remove

2012-08-18 Thread Emil Goode
The gpiochip_remove function may fail to remove a gpio_chip
if any GPIOs are still requested. This patch informs the caller
of such a senario.

Sparse is warning because the function prototype has a
__must_check annotation.

Sparse warning:
drivers/tty/serial/max310x.c:1223:18: warning:
ignoring return value of ‘gpiochip_remove’,
declared with attribute warn_unused_result
[-Wunused-result]

Signed-off-by: Emil Goode 
---
 drivers/tty/serial/max310x.c |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 534e448..06ff5ad 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1207,6 +1207,7 @@ static int __devexit max310x_remove(struct spi_device 
*spi)
 {
struct device *dev = &spi->dev;
struct max310x_port *s = dev_get_drvdata(dev);
+   int ret = 0;
 
dev_dbg(dev, "Removing port\n");
 
@@ -1219,8 +1220,11 @@ static int __devexit max310x_remove(struct spi_device 
*spi)
uart_unregister_driver(&s->uart);
 
 #ifdef CONFIG_GPIOLIB
-   if (s->pdata->gpio_base)
-   gpiochip_remove(&s->gpio);
+   if (s->pdata->gpio_base) {
+   ret = gpiochip_remove(&s->gpio);
+   if (ret)
+   dev_err(dev, "Failed to remove gpio chip: %d\n", ret);
+   }
 #endif
 
dev_set_drvdata(dev, NULL);
@@ -1232,7 +1236,7 @@ static int __devexit max310x_remove(struct spi_device 
*spi)
 
devm_kfree(dev, s);
 
-   return 0;
+   return ret;
 }
 
 static const struct spi_device_id max310x_id_table[] = {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] tty: serial: Remove explicit use of devm_kfree

2012-08-18 Thread Emil Goode
There is no reason to explicitly call devm_kfree
in probe or remove functions.

Signed-off-by: Emil Goode 
---
 drivers/tty/serial/max310x.c |3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 06ff5ad..2bc28a5 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1198,7 +1198,6 @@ err_freq:
 
 err_out:
dev_set_drvdata(dev, NULL);
-   devm_kfree(dev, s);
 
return ret;
 }
@@ -1234,8 +1233,6 @@ static int __devexit max310x_remove(struct spi_device 
*spi)
if (s->pdata->exit)
s->pdata->exit();
 
-   devm_kfree(dev, s);
-
return ret;
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] pebs, x86: Make sure to really disable PEBS

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

When disabling a PEBS event we need to check the old value
to determine if PEBS was running. Otherwise the last PEBS value
could be kept running.

Signed-off-by: Andi Kleen 
---
 arch/x86/kernel/cpu/perf_event_intel_ds.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c 
b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index e38d97b..db49ab3 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -438,9 +438,10 @@ void intel_pmu_pebs_disable(struct perf_event *event)
 {
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
struct hw_perf_event *hwc = &event->hw;
+   u64 old = cpuc->pebs_enabled;
 
cpuc->pebs_enabled &= ~(1ULL << hwc->idx);
-   if (cpuc->enabled)
+   if (old)
wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled);
 
hwc->config |= ARCH_PERFMON_EVENTSEL_INT;
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] perf: Enable function tracing for perf core

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

According to Steven R. there is no reason left to not support
function tracing for the perf core. This makes it easier to debug
perf.

Don't remove -pg for the x86 and generic perf core.

Cc: rost...@goodmis.org
Signed-off-by: Andi Kleen 
---
 arch/x86/kernel/cpu/Makefile |1 -
 kernel/events/Makefile   |4 
 2 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index d30a6a9..6a16725 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -5,7 +5,6 @@
 # Don't trace early stages of a secondary CPU boot
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_common.o = -pg
-CFLAGS_REMOVE_perf_event.o = -pg
 endif
 
 # Make sure load_percpu_segment has no stackprotector
diff --git a/kernel/events/Makefile b/kernel/events/Makefile
index 103f5d1..a630994 100644
--- a/kernel/events/Makefile
+++ b/kernel/events/Makefile
@@ -1,7 +1,3 @@
-ifdef CONFIG_FUNCTION_TRACER
-CFLAGS_REMOVE_core.o = -pg
-endif
-
 obj-y := core.o ring_buffer.o callchain.o
 
 obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/11] ARM: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well.

Cc: 
Cc: Arnd Bergmann 
Signed-off-by: Fabio Estevam 
---
 arch/arm/configs/acs5k_tiny_defconfig |1 -
 arch/arm/configs/ap4evb_defconfig |1 -
 arch/arm/configs/at91sam9261_defconfig|1 -
 arch/arm/configs/at91sam9263_defconfig|1 -
 arch/arm/configs/at91sam9g45_defconfig|1 -
 arch/arm/configs/bcmring_defconfig|1 -
 arch/arm/configs/cam60_defconfig  |1 -
 arch/arm/configs/cm_x2xx_defconfig|1 -
 arch/arm/configs/cns3420vb_defconfig  |1 -
 arch/arm/configs/colibri_pxa300_defconfig |1 -
 arch/arm/configs/cpu9260_defconfig|1 -
 arch/arm/configs/cpu9g20_defconfig|1 -
 arch/arm/configs/em_x270_defconfig|1 -
 arch/arm/configs/ezx_defconfig|1 -
 arch/arm/configs/g3evm_defconfig  |1 -
 arch/arm/configs/g4evm_defconfig  |1 -
 arch/arm/configs/h3600_defconfig  |1 -
 arch/arm/configs/imote2_defconfig |1 -
 arch/arm/configs/kirkwood_defconfig   |1 -
 arch/arm/configs/magician_defconfig   |1 -
 arch/arm/configs/mmp2_defconfig   |1 -
 arch/arm/configs/nuc910_defconfig |1 -
 arch/arm/configs/nuc950_defconfig |1 -
 arch/arm/configs/nuc960_defconfig |1 -
 arch/arm/configs/palmz72_defconfig|1 -
 arch/arm/configs/pcm027_defconfig |1 -
 arch/arm/configs/pxa168_defconfig |1 -
 arch/arm/configs/pxa3xx_defconfig |1 -
 arch/arm/configs/pxa910_defconfig |1 -
 arch/arm/configs/qil-a9260_defconfig  |1 -
 arch/arm/configs/s5p64x0_defconfig|1 -
 arch/arm/configs/s5pv210_defconfig|1 -
 arch/arm/configs/sam9_l9260_defconfig |1 -
 arch/arm/configs/stamp9g20_defconfig  |1 -
 arch/arm/configs/tct_hammer_defconfig |1 -
 arch/arm/configs/usb-a9260_defconfig  |1 -
 arch/arm/configs/vexpress_defconfig   |1 -
 arch/arm/configs/xcep_defconfig   |1 -
 38 files changed, 38 deletions(-)

diff --git a/arch/arm/configs/acs5k_tiny_defconfig 
b/arch/arm/configs/acs5k_tiny_defconfig
index 2a27a14..ae52a07 100644
--- a/arch/arm/configs/acs5k_tiny_defconfig
+++ b/arch/arm/configs/acs5k_tiny_defconfig
@@ -40,7 +40,6 @@ CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
 # CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_ARM_KS8695_ETHER=y
diff --git a/arch/arm/configs/ap4evb_defconfig 
b/arch/arm/configs/ap4evb_defconfig
index 2eef85e..ba3455d 100644
--- a/arch/arm/configs/ap4evb_defconfig
+++ b/arch/arm/configs/ap4evb_defconfig
@@ -31,7 +31,6 @@ CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_NAND=y
 # CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
diff --git a/arch/arm/configs/at91sam9261_defconfig 
b/arch/arm/configs/at91sam9261_defconfig
index 1e8712e..c2005df 100644
--- a/arch/arm/configs/at91sam9261_defconfig
+++ b/arch/arm/configs/at91sam9261_defconfig
@@ -51,7 +51,6 @@ CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_GLUEBI=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_SSC=y
 CONFIG_SCSI=y
diff --git a/arch/arm/configs/at91sam9263_defconfig 
b/arch/arm/configs/at91sam9263_defconfig
index d2050ca..b89306e 100644
--- a/arch/arm/configs/at91sam9263_defconfig
+++ b/arch/arm/configs/at91sam9263_defconfig
@@ -66,7 +66,6 @@ CONFIG_MTD_UBI_GLUEBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_PWM=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_SCSI=y
diff --git a/arch/arm/configs/at91sam9g45_defconfig 
b/arch/arm/configs/at91sam9g45_defconfig
index 606d48f..a3cb69e 100644
--- a/arch/arm/configs/at91sam9g45_defconfig
+++ b/arch/arm/configs/at91sam9g45_defconfig
@@ -65,7 +65,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=4
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_PWM=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_SCSI=y
diff --git a/arch/arm/configs/bcmring_defconfig 
b/arch/arm/configs/bcmring_defconfig
index 9e6a8fe..e67e755 100644
--- a/arch/arm/configs/bcmring_defconfig
+++ b/arch/arm/configs/bcmring_defconfig
@@ -47,7 +47,6 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_VERIFY_WRITE=y
 CONFIG_MTD_NAND_BCM_UMI=y
 CONFIG_MTD_NAND_BCM_UMI_HWCS=y
-# CONFIG_MISC_DEVICES is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
diff --git a/arch/arm/configs/cam60_defconfig b/arch/arm/configs/cam60_defconfig
index cedc92e..04a4edf 100644
--- a/arch/arm/configs/cam60_defconfig
+++ b/arch/arm

[PATCH 08/11] powerpc: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Benjamin Herrenschmidt 
Cc: Kumar Gala 
Signed-off-by: Fabio Estevam 
---
 arch/powerpc/configs/40x/acadia_defconfig|1 -
 arch/powerpc/configs/40x/kilauea_defconfig   |1 -
 arch/powerpc/configs/40x/makalu_defconfig|1 -
 arch/powerpc/configs/44x/arches_defconfig|1 -
 arch/powerpc/configs/44x/canyonlands_defconfig   |1 -
 arch/powerpc/configs/44x/eiger_defconfig |1 -
 arch/powerpc/configs/44x/icon_defconfig  |1 -
 arch/powerpc/configs/44x/redwood_defconfig   |1 -
 arch/powerpc/configs/44x/sam440ep_defconfig  |1 -
 arch/powerpc/configs/44x/warp_defconfig  |1 -
 arch/powerpc/configs/52xx/cm5200_defconfig   |1 -
 arch/powerpc/configs/52xx/motionpro_defconfig|1 -
 arch/powerpc/configs/52xx/pcm030_defconfig   |1 -
 arch/powerpc/configs/85xx/ge_imp3a_defconfig |1 -
 arch/powerpc/configs/85xx/p1023rds_defconfig |1 -
 arch/powerpc/configs/86xx/gef_ppc9a_defconfig|1 -
 arch/powerpc/configs/86xx/gef_sbc310_defconfig   |1 -
 arch/powerpc/configs/86xx/gef_sbc610_defconfig   |1 -
 arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig |1 -
 arch/powerpc/configs/adder875_defconfig  |1 -
 arch/powerpc/configs/c2k_defconfig   |1 -
 arch/powerpc/configs/chroma_defconfig|1 -
 arch/powerpc/configs/corenet32_smp_defconfig |1 -
 arch/powerpc/configs/ep8248e_defconfig   |1 -
 arch/powerpc/configs/ep88xc_defconfig|1 -
 arch/powerpc/configs/linkstation_defconfig   |1 -
 arch/powerpc/configs/mpc512x_defconfig   |1 -
 arch/powerpc/configs/mpc8272_ads_defconfig   |1 -
 arch/powerpc/configs/mpc85xx_defconfig   |1 -
 arch/powerpc/configs/mpc85xx_smp_defconfig   |1 -
 arch/powerpc/configs/mpc86xx_defconfig   |1 -
 arch/powerpc/configs/mpc885_ads_defconfig|1 -
 arch/powerpc/configs/pasemi_defconfig|1 -
 arch/powerpc/configs/ppc6xx_defconfig|1 -
 arch/powerpc/configs/tqm8xx_defconfig|1 -
 35 files changed, 35 deletions(-)

diff --git a/arch/powerpc/configs/40x/acadia_defconfig 
b/arch/powerpc/configs/40x/acadia_defconfig
index ed3bab7..e107272 100644
--- a/arch/powerpc/configs/40x/acadia_defconfig
+++ b/arch/powerpc/configs/40x/acadia_defconfig
@@ -42,7 +42,6 @@ CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_ETHERNET=y
 CONFIG_NET_VENDOR_IBM=y
diff --git a/arch/powerpc/configs/40x/kilauea_defconfig 
b/arch/powerpc/configs/40x/kilauea_defconfig
index f2d4be9..69883f8 100644
--- a/arch/powerpc/configs/40x/kilauea_defconfig
+++ b/arch/powerpc/configs/40x/kilauea_defconfig
@@ -49,7 +49,6 @@ CONFIG_SUSPEND=y
 CONFIG_PPC4xx_CPM=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_ETHERNET=y
 CONFIG_NET_VENDOR_IBM=y
diff --git a/arch/powerpc/configs/40x/makalu_defconfig 
b/arch/powerpc/configs/40x/makalu_defconfig
index 42b9793..e9c7290 100644
--- a/arch/powerpc/configs/40x/makalu_defconfig
+++ b/arch/powerpc/configs/40x/makalu_defconfig
@@ -41,7 +41,6 @@ CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_ETHERNET=y
 CONFIG_NET_VENDOR_IBM=y
diff --git a/arch/powerpc/configs/44x/arches_defconfig 
b/arch/powerpc/configs/44x/arches_defconfig
index 329f9a3..ad14b24 100644
--- a/arch/powerpc/configs/44x/arches_defconfig
+++ b/arch/powerpc/configs/44x/arches_defconfig
@@ -42,7 +42,6 @@ CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_ETHERNET=y
 CONFIG_NET_VENDOR_IBM=y
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig 
b/arch/powerpc/configs/44x/canyonlands_defconfig
index d5be93e..52b944b 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -47,7 +47,6 @@ CONFIG_SUSPEND=y
 CONFIG_PPC4xx_CPM=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_ETHERNET=y
 CONFIG_NET_VENDOR_IBM=y
diff --git a/arch/powerpc/configs/44x/eiger_defconfig 
b/arch/powerpc/configs/44x/eiger_defconfig
index 9be0890..967c642 100644
--- a/arch/powerpc/configs/44x/eiger_defconfig
+++ b/arch/powerpc/configs/44x/eiger_defconfig
@@ -47,7 +47,6 @@ CONFIG_MTD_NAND_NDFC=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=35000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD

[PATCH 09/11] score: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Chen Liqin 
Cc: Lennox Wu 
Signed-off-by: Fabio Estevam 
---
 arch/score/configs/spct6600_defconfig |1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/score/configs/spct6600_defconfig 
b/arch/score/configs/spct6600_defconfig
index df1edbf..4e7f498 100644
--- a/arch/score/configs/spct6600_defconfig
+++ b/arch/score/configs/spct6600_defconfig
@@ -33,7 +33,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_CRYPTOLOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=1
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_1 is not set
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/11] sh: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Paul Mundt 
Signed-off-by: Fabio Estevam 
---
 arch/sh/configs/ecovec24-romimage_defconfig |1 -
 arch/sh/configs/edosk7705_defconfig |1 -
 arch/sh/configs/edosk7760_defconfig |1 -
 arch/sh/configs/espt_defconfig  |1 -
 arch/sh/configs/kfr2r09-romimage_defconfig  |1 -
 arch/sh/configs/kfr2r09_defconfig   |1 -
 arch/sh/configs/sdk7780_defconfig   |1 -
 arch/sh/configs/sdk7786_defconfig   |1 -
 arch/sh/configs/se7343_defconfig|1 -
 arch/sh/configs/secureedge5410_defconfig|1 -
 arch/sh/configs/sh2007_defconfig|1 -
 arch/sh/configs/sh7724_generic_defconfig|1 -
 arch/sh/configs/sh7763rdp_defconfig |1 -
 arch/sh/configs/sh7770_generic_defconfig|1 -
 arch/sh/configs/sh7785lcr_32bit_defconfig   |1 -
 arch/sh/configs/sh7785lcr_defconfig |1 -
 arch/sh/configs/urquell_defconfig   |1 -
 17 files changed, 17 deletions(-)

diff --git a/arch/sh/configs/ecovec24-romimage_defconfig 
b/arch/sh/configs/ecovec24-romimage_defconfig
index 5fcb17b..3f4f8d6 100644
--- a/arch/sh/configs/ecovec24-romimage_defconfig
+++ b/arch/sh/configs/ecovec24-romimage_defconfig
@@ -30,7 +30,6 @@ CONFIG_INET=y
 # CONFIG_INET_DIAG is not set
 # CONFIG_IPV6 is not set
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_MISC_DEVICES is not set
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_LOWLEVEL is not set
diff --git a/arch/sh/configs/edosk7705_defconfig 
b/arch/sh/configs/edosk7705_defconfig
index 41fa3a7..d8d240c5 100644
--- a/arch/sh/configs/edosk7705_defconfig
+++ b/arch/sh/configs/edosk7705_defconfig
@@ -20,7 +20,6 @@ CONFIG_CPU_SUBTYPE_SH7705=y
 CONFIG_SH_EDOSK7705=y
 CONFIG_SH_PCLK_FREQ=3125
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-# CONFIG_MISC_DEVICES is not set
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
diff --git a/arch/sh/configs/edosk7760_defconfig 
b/arch/sh/configs/edosk7760_defconfig
index e1077a0..52e8af8 100644
--- a/arch/sh/configs/edosk7760_defconfig
+++ b/arch/sh/configs/edosk7760_defconfig
@@ -62,7 +62,6 @@ CONFIG_MTD_ABSENT=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=26000
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_SMC91X=y
diff --git a/arch/sh/configs/espt_defconfig b/arch/sh/configs/espt_defconfig
index 67cb109..c1d6e36 100644
--- a/arch/sh/configs/espt_defconfig
+++ b/arch/sh/configs/espt_defconfig
@@ -43,7 +43,6 @@ CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_NETDEVICES=y
diff --git a/arch/sh/configs/kfr2r09-romimage_defconfig 
b/arch/sh/configs/kfr2r09-romimage_defconfig
index 029a506..d6932ea 100644
--- a/arch/sh/configs/kfr2r09-romimage_defconfig
+++ b/arch/sh/configs/kfr2r09-romimage_defconfig
@@ -31,7 +31,6 @@ CONFIG_INET=y
 # CONFIG_IPV6 is not set
 # CONFIG_WIRELESS is not set
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_MISC_DEVICES is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
diff --git a/arch/sh/configs/kfr2r09_defconfig 
b/arch/sh/configs/kfr2r09_defconfig
index fac13de..eaaf8da 100644
--- a/arch/sh/configs/kfr2r09_defconfig
+++ b/arch/sh/configs/kfr2r09_defconfig
@@ -49,7 +49,6 @@ CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_GENERIC=y
 CONFIG_MTD_UBI=y
-# CONFIG_MISC_DEVICES is not set
 # CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_EVDEV=y
 # CONFIG_KEYBOARD_ATKBD is not set
diff --git a/arch/sh/configs/sdk7780_defconfig 
b/arch/sh/configs/sdk7780_defconfig
index ae11158..7d28cc5 100644
--- a/arch/sh/configs/sdk7780_defconfig
+++ b/arch/sh/configs/sdk7780_defconfig
@@ -46,7 +46,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_PARPORT=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_PLATFORM=y
diff --git a/arch/sh/configs/sdk7786_defconfig 
b/arch/sh/configs/sdk7786_defconfig
index 76a76a2..eec1215 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -120,7 +120,6 @@ CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_CRYPTOLOOP=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_PLATFORM=y
diff --git a/arch/sh/configs/se7343_defconfig b/arch/sh/configs/se7343_defconfig
index be9c474..1e181ad 100644
--- a/arch/sh/configs/se7343_defconfig
+++ b/arch/sh/configs/se7343_defconfig
@@ -40,7 +40,6 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_PHYSMAP=y
-# CONFIG_MISC_DEVICES is not set

[PATCH 11/11] xtensa: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Chris Zankel 
Cc: Max Filippov 
Signed-off-by: Fabio Estevam 
---
 arch/xtensa/configs/iss_defconfig   |1 -
 arch/xtensa/configs/s6105_defconfig |1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/xtensa/configs/iss_defconfig 
b/arch/xtensa/configs/iss_defconfig
index ddab37b..ba88797 100644
--- a/arch/xtensa/configs/iss_defconfig
+++ b/arch/xtensa/configs/iss_defconfig
@@ -302,7 +302,6 @@ CONFIG_BLK_DEV=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_BLK_DEV_HD is not set
-CONFIG_MISC_DEVICES=y
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_C2PORT is not set
 
diff --git a/arch/xtensa/configs/s6105_defconfig 
b/arch/xtensa/configs/s6105_defconfig
index 550e8ed..43bf2dc 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -248,7 +248,6 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_BLK_DEV_HD is not set
-# CONFIG_MISC_DEVICES is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 04/11] C6X: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Mark Salter 
Signed-off-by: Fabio Estevam 
---
 arch/c6x/configs/dsk6455_defconfig  |1 -
 arch/c6x/configs/evmc6457_defconfig |1 -
 arch/c6x/configs/evmc6472_defconfig |1 -
 arch/c6x/configs/evmc6474_defconfig |1 -
 arch/c6x/configs/evmc6678_defconfig |1 -
 5 files changed, 5 deletions(-)

diff --git a/arch/c6x/configs/dsk6455_defconfig 
b/arch/c6x/configs/dsk6455_defconfig
index 4663487..bdd505f 100644
--- a/arch/c6x/configs/dsk6455_defconfig
+++ b/arch/c6x/configs/dsk6455_defconfig
@@ -25,7 +25,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_BLK_DEV_RAM_SIZE=17000
-CONFIG_MISC_DEVICES=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
diff --git a/arch/c6x/configs/evmc6457_defconfig 
b/arch/c6x/configs/evmc6457_defconfig
index bba40e1..259cf2c 100644
--- a/arch/c6x/configs/evmc6457_defconfig
+++ b/arch/c6x/configs/evmc6457_defconfig
@@ -26,7 +26,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_BLK_DEV_RAM_SIZE=17000
-CONFIG_MISC_DEVICES=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
diff --git a/arch/c6x/configs/evmc6472_defconfig 
b/arch/c6x/configs/evmc6472_defconfig
index 8c46155..fc26531 100644
--- a/arch/c6x/configs/evmc6472_defconfig
+++ b/arch/c6x/configs/evmc6472_defconfig
@@ -27,7 +27,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_BLK_DEV_RAM_SIZE=17000
-CONFIG_MISC_DEVICES=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
diff --git a/arch/c6x/configs/evmc6474_defconfig 
b/arch/c6x/configs/evmc6474_defconfig
index 15533f6..3e79abc 100644
--- a/arch/c6x/configs/evmc6474_defconfig
+++ b/arch/c6x/configs/evmc6474_defconfig
@@ -27,7 +27,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_BLK_DEV_RAM_SIZE=17000
-CONFIG_MISC_DEVICES=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
diff --git a/arch/c6x/configs/evmc6678_defconfig 
b/arch/c6x/configs/evmc6678_defconfig
index 5f126d4..7b907b6 100644
--- a/arch/c6x/configs/evmc6678_defconfig
+++ b/arch/c6x/configs/evmc6678_defconfig
@@ -27,7 +27,6 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_BLK_DEV_RAM_SIZE=17000
-CONFIG_MISC_DEVICES=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 03/11] blackfin: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Mike Frysinger 
Cc: 
Signed-off-by: Fabio Estevam 
---
 arch/blackfin/configs/BlackStamp_defconfig |1 -
 arch/blackfin/configs/H8606_defconfig  |1 -
 arch/blackfin/configs/SRV1_defconfig   |1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/blackfin/configs/BlackStamp_defconfig 
b/arch/blackfin/configs/BlackStamp_defconfig
index 7b982d0..8f94e54 100644
--- a/arch/blackfin/configs/BlackStamp_defconfig
+++ b/arch/blackfin/configs/BlackStamp_defconfig
@@ -58,7 +58,6 @@ CONFIG_MTD_M25P80=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
-CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT25=y
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
diff --git a/arch/blackfin/configs/H8606_defconfig 
b/arch/blackfin/configs/H8606_defconfig
index a26436b..fbdca43 100644
--- a/arch/blackfin/configs/H8606_defconfig
+++ b/arch/blackfin/configs/H8606_defconfig
@@ -45,7 +45,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_M25P80=y
 # CONFIG_M25PXX_USE_FAST_READ is not set
 CONFIG_BLK_DEV_RAM=y
-CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT25=y
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
diff --git a/arch/blackfin/configs/SRV1_defconfig 
b/arch/blackfin/configs/SRV1_defconfig
index 0520c16..2fa7b6d 100644
--- a/arch/blackfin/configs/SRV1_defconfig
+++ b/arch/blackfin/configs/SRV1_defconfig
@@ -48,7 +48,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_MTD_NAND=m
 CONFIG_BLK_DEV_RAM=y
-CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT25=m
 CONFIG_NETDEVICES=y
 # CONFIG_NETDEV_1000 is not set
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 05/11] ia64: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Tony Luck 
Signed-off-by: Fabio Estevam 
---
 arch/ia64/configs/generic_defconfig   |1 -
 arch/ia64/configs/gensparse_defconfig |1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/ia64/configs/generic_defconfig 
b/arch/ia64/configs/generic_defconfig
index 954d81e..7913695 100644
--- a/arch/ia64/configs/generic_defconfig
+++ b/arch/ia64/configs/generic_defconfig
@@ -234,5 +234,4 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRC_T10DIF=y
-CONFIG_MISC_DEVICES=y
 CONFIG_INTEL_IOMMU=y
diff --git a/arch/ia64/configs/gensparse_defconfig 
b/arch/ia64/configs/gensparse_defconfig
index 91c41ec..f8e9133 100644
--- a/arch/ia64/configs/gensparse_defconfig
+++ b/arch/ia64/configs/gensparse_defconfig
@@ -209,4 +209,3 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_CRYPTO_MD5=y
-CONFIG_MISC_DEVICES=y
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 02/11] AVR32: deconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well.

Cc: Haavard Skinnemoen 
Signed-off-by: Fabio Estevam 
---
 arch/avr32/configs/atngw100_defconfig  |1 -
 arch/avr32/configs/atngw100_evklcd100_defconfig|1 -
 arch/avr32/configs/atngw100_evklcd101_defconfig|1 -
 arch/avr32/configs/atngw100mkii_defconfig  |1 -
 .../avr32/configs/atngw100mkii_evklcd100_defconfig |1 -
 .../avr32/configs/atngw100mkii_evklcd101_defconfig |1 -
 arch/avr32/configs/atstk1002_defconfig |1 -
 arch/avr32/configs/atstk1003_defconfig |1 -
 arch/avr32/configs/atstk1004_defconfig |1 -
 arch/avr32/configs/atstk1006_defconfig |1 -
 10 files changed, 10 deletions(-)

diff --git a/arch/avr32/configs/atngw100_defconfig 
b/arch/avr32/configs/atngw100_defconfig
index a06bfcc..8c5e2f4 100644
--- a/arch/avr32/configs/atngw100_defconfig
+++ b/arch/avr32/configs/atngw100_defconfig
@@ -71,7 +71,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig 
b/arch/avr32/configs/atngw100_evklcd100_defconfig
index d8f1fe8..2c3fb38 100644
--- a/arch/avr32/configs/atngw100_evklcd100_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd100_defconfig
@@ -73,7 +73,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig 
b/arch/avr32/configs/atngw100_evklcd101_defconfig
index d4c5b19..4128b17 100644
--- a/arch/avr32/configs/atngw100_evklcd101_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd101_defconfig
@@ -72,7 +72,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atngw100mkii_defconfig 
b/arch/avr32/configs/atngw100mkii_defconfig
index 6e0dca4..5df9467 100644
--- a/arch/avr32/configs/atngw100mkii_defconfig
+++ b/arch/avr32/configs/atngw100mkii_defconfig
@@ -73,7 +73,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig 
b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
index 7f2a344..d4448d1 100644
--- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
+++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
@@ -76,7 +76,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig 
b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
index 085eeba..871ba06 100644
--- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
+++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
@@ -75,7 +75,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_NETDEVICES=y
 CONFIG_TUN=m
diff --git a/arch/avr32/configs/atstk1002_defconfig 
b/arch/avr32/configs/atstk1002_defconfig
index d1a887e..6c60c25 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_defconfig
@@ -64,7 +64,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_PWM=m
 CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_SSC=m
diff --git a/arch/avr32/configs/atstk1003_defconfig 
b/arch/avr32/configs/atstk1003_defconfig
index 956f281..f792302 100644
--- a/arch/avr32/configs/atstk1003_defconfig
+++ b/arch/avr32/configs/atstk1003_defconfig
@@ -53,7 +53,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_PWM=m
 CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_SSC=m
diff --git a/arch/avr32/configs/atstk1004_defconfig 
b/arch/avr32/configs/atstk1004_defconfig
index 40c69f3..39d1224 100644
--- a/arch/avr32/configs/atstk1004_defconfig
+++ b/arch/avr32/configs/atstk1004_defconfig
@@ -53,7 +53,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATMEL_PWM=m
 CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_SSC=m
diff --git a/arch/avr32/configs/atstk1006_defconfig 
b/arch/avr32/configs/atstk1006_defconfig
index 511eb8a..704c696 100644
--- a/arch/avr32/configs/atstk1006_defconfig
+++ b/arch/avr32/configs/atstk1006_defconfig
@@ -67,7 +67,6 @@ CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=m
-CONFIG_MISC_DEVICES=y
 CONFIG_ATM

[PATCH 06/11] m68k: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Geert Uytterhoeven 
Signed-off-by: Fabio Estevam 
---
 arch/m68k/configs/m5208evb_defconfig |1 -
 arch/m68k/configs/m5249evb_defconfig |1 -
 arch/m68k/configs/m5272c3_defconfig  |1 -
 arch/m68k/configs/m5275evb_defconfig |1 -
 arch/m68k/configs/m5307c3_defconfig  |1 -
 arch/m68k/configs/m5407c3_defconfig  |1 -
 6 files changed, 6 deletions(-)

diff --git a/arch/m68k/configs/m5208evb_defconfig 
b/arch/m68k/configs/m5208evb_defconfig
index c161682..dd28495 100644
--- a/arch/m68k/configs/m5208evb_defconfig
+++ b/arch/m68k/configs/m5208evb_defconfig
@@ -46,7 +46,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC=y
diff --git a/arch/m68k/configs/m5249evb_defconfig 
b/arch/m68k/configs/m5249evb_defconfig
index a6599e4..6c34506 100644
--- a/arch/m68k/configs/m5249evb_defconfig
+++ b/arch/m68k/configs/m5249evb_defconfig
@@ -44,7 +44,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 # CONFIG_NETDEV_1000 is not set
diff --git a/arch/m68k/configs/m5272c3_defconfig 
b/arch/m68k/configs/m5272c3_defconfig
index 3fa60a5..179771d 100644
--- a/arch/m68k/configs/m5272c3_defconfig
+++ b/arch/m68k/configs/m5272c3_defconfig
@@ -42,7 +42,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC=y
diff --git a/arch/m68k/configs/m5275evb_defconfig 
b/arch/m68k/configs/m5275evb_defconfig
index a1230e8..b963485 100644
--- a/arch/m68k/configs/m5275evb_defconfig
+++ b/arch/m68k/configs/m5275evb_defconfig
@@ -45,7 +45,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_FEC=y
diff --git a/arch/m68k/configs/m5307c3_defconfig 
b/arch/m68k/configs/m5307c3_defconfig
index 43795f4..74a633a 100644
--- a/arch/m68k/configs/m5307c3_defconfig
+++ b/arch/m68k/configs/m5307c3_defconfig
@@ -44,7 +44,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 # CONFIG_NETDEV_1000 is not set
diff --git a/arch/m68k/configs/m5407c3_defconfig 
b/arch/m68k/configs/m5407c3_defconfig
index 72746c5..86101f1 100644
--- a/arch/m68k/configs/m5407c3_defconfig
+++ b/arch/m68k/configs/m5407c3_defconfig
@@ -44,7 +44,6 @@ CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_UCLINUX=y
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 # CONFIG_NETDEV_1000 is not set
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/11] mips: defconfig: Remove CONFIG_MISC_DEVICES

2012-08-18 Thread Fabio Estevam
From: Fabio Estevam 

commit 7c5763 (drivers:misc: Remove MISC_DEVICES config option) removed 
CONFIG_MISC_DEVICES option, so remove the occurrences from the config files 
as well

Cc: Ralf Baechle 
Signed-off-by: Fabio Estevam 
---
 arch/mips/configs/bcm63xx_defconfig|1 -
 arch/mips/configs/capcella_defconfig   |1 -
 arch/mips/configs/cavium-octeon_defconfig  |1 -
 arch/mips/configs/cobalt_defconfig |1 -
 arch/mips/configs/db1200_defconfig |1 -
 arch/mips/configs/db1550_defconfig |1 -
 arch/mips/configs/e55_defconfig|1 -
 arch/mips/configs/fuloong2e_defconfig  |1 -
 arch/mips/configs/ip22_defconfig   |1 -
 arch/mips/configs/ip27_defconfig   |1 -
 arch/mips/configs/ip28_defconfig   |1 -
 arch/mips/configs/jmr3927_defconfig|1 -
 arch/mips/configs/lasat_defconfig  |1 -
 arch/mips/configs/lemote2f_defconfig   |1 -
 arch/mips/configs/malta_defconfig  |1 -
 arch/mips/configs/mipssim_defconfig|1 -
 arch/mips/configs/mpc30x_defconfig |1 -
 arch/mips/configs/mtx1_defconfig   |1 -
 arch/mips/configs/nlm_xlr_defconfig|1 -
 arch/mips/configs/pb1100_defconfig |1 -
 arch/mips/configs/pb1500_defconfig |1 -
 arch/mips/configs/pb1550_defconfig |1 -
 arch/mips/configs/pnx8335-stb225_defconfig |1 -
 arch/mips/configs/powertv_defconfig|1 -
 arch/mips/configs/rbtx49xx_defconfig   |1 -
 arch/mips/configs/tb0219_defconfig |1 -
 arch/mips/configs/tb0226_defconfig |1 -
 arch/mips/configs/tb0287_defconfig |1 -
 arch/mips/configs/workpad_defconfig|1 -
 29 files changed, 29 deletions(-)

diff --git a/arch/mips/configs/bcm63xx_defconfig 
b/arch/mips/configs/bcm63xx_defconfig
index 9190051..9dacac7 100644
--- a/arch/mips/configs/bcm63xx_defconfig
+++ b/arch/mips/configs/bcm63xx_defconfig
@@ -50,7 +50,6 @@ CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
 # CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_BCM63XX_PHY=y
 CONFIG_NET_ETHERNET=y
diff --git a/arch/mips/configs/capcella_defconfig 
b/arch/mips/configs/capcella_defconfig
index 5135dc0..50e0d9f 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -31,7 +31,6 @@ CONFIG_NETWORK_SECMARK=y
 CONFIG_IP_SCTP=m
 CONFIG_FW_LOADER=m
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_IDE=y
 CONFIG_IDE_GENERIC=y
 CONFIG_NETDEVICES=y
diff --git a/arch/mips/configs/cavium-octeon_defconfig 
b/arch/mips/configs/cavium-octeon_defconfig
index 75165df..1104d95 100644
--- a/arch/mips/configs/cavium-octeon_defconfig
+++ b/arch/mips/configs/cavium-octeon_defconfig
@@ -53,7 +53,6 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_BLK_DEV_LOOP=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_NETDEVICES=y
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
diff --git a/arch/mips/configs/cobalt_defconfig 
b/arch/mips/configs/cobalt_defconfig
index 5419adb..9d63892 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -26,7 +26,6 @@ CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_BLK_DEV_LOOP=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_RAID_ATTRS=y
 CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_LOWLEVEL is not set
diff --git a/arch/mips/configs/db1200_defconfig 
b/arch/mips/configs/db1200_defconfig
index 1f69249..3108925 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -54,7 +54,6 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_PLATFORM=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_UB=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_IDE=y
 CONFIG_BLK_DEV_IDECS=y
 CONFIG_BLK_DEV_IDECD=y
diff --git a/arch/mips/configs/db1550_defconfig 
b/arch/mips/configs/db1550_defconfig
index 36cda27..16beead 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -111,7 +111,6 @@ CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_IDS=y
 CONFIG_MTD_NAND_PLATFORM=y
-CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT24=y
 CONFIG_SCSI_MOD=y
 CONFIG_SCSI=y
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index 0126e66..2d107b8 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -14,7 +14,6 @@ CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_BLK_DEV_RAM=y
-# CONFIG_MISC_DEVICES is not set
 CONFIG_IDE=y
 CONFIG_IDE_GENERIC=y
 # CONFIG_INPUT_MOUSEDEV is not set
diff --git a/arch/mips/configs/fuloong2e_defconfig 
b/arch/mips/configs/fuloong2e_defconfig
index e5b73de..4f3b06c 100644
--- a/arch/mips/configs/fuloong2e_defconfig
+++ b/arch/mips/configs/fuloong2e_defconfig
@@ -114,7 +114,6 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_RAM=m
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_ATA_OVE

Re: [bisected] Driver core fixes for 3.6-rc3 regression

2012-08-18 Thread Greg KH
On Sat, Aug 18, 2012 at 08:09:34AM +0200, Markus Trippelsdorf wrote:
> On 2012.08.17 at 10:13 -0700, Greg KH wrote:
> > 
> > Driver core fixes for 3.6-rc3
> > 
> > Here are two tiny patches, one fixing a dynamic debug problem that the 
> > printk
> > rework turned up, and the other one fixing an extcon problem that people
> > reported.
> > 
> > Signed-off-by: Greg Kroah-Hartman 
> > 
> > 
> > Axel Lin (1):
> >   extcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one
> > 
> > Jim Cromie (1):
> >   drivers-core: make structured logging play nice with dynamic-debug
> 
> The commit af7f2158f above causes hundreds of "Failed to force enable
> HPET" messages to appear during boot on my system.
> Please also note the strange "^A0" character sequence that is also
> introduced by the same commit.

Ugh, I see the same thing here, debugging must be accidentally enabled
with this patch, and the ^A0 stuff is just a mess.  Sorry, I didn't
notice this in my testing, my fault.

Reverting this resolves the issue for me.

Jim, any thoughts on how to fix this?  Should I just revert this patch
for now?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Const section fixes tree sweep

2012-08-18 Thread Andi Kleen
This tree sweep fixes up const section conflicts. Each section can 
either be read-write or read-only. Read-only sections can contain
only read-only (const) data, read-write only non const data.

This fixes this everywhere for x86 at least (and a few other
places found by grep) 

The previous version had some issues with a broken PA-RISC
toolchain. I disabled the whole thing on PA-RISC now instead.

Needed for followon patchkits.

-Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 28/31] sections: Fix section conflicts in net/can

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 net/can/af_can.c |2 +-
 net/can/bcm.c|2 +-
 net/can/gw.c |2 +-
 net/can/raw.c|2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/can/af_can.c b/net/can/af_can.c
index 821022a..ddac1ee 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -63,7 +63,7 @@
 
 #include "af_can.h"
 
-static __initdata const char banner[] = KERN_INFO
+static __initconst const char banner[] = KERN_INFO
"can: controller area network core (" CAN_VERSION_STRING ")\n";
 
 MODULE_DESCRIPTION("Controller Area Network PF_CAN core");
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 151b773..6f74758 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -77,7 +77,7 @@
 (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
 
 #define CAN_BCM_VERSION CAN_VERSION
-static __initdata const char banner[] = KERN_INFO
+static __initconst const char banner[] = KERN_INFO
"can: broadcast manager protocol (rev " CAN_BCM_VERSION " t)\n";
 
 MODULE_DESCRIPTION("PF_CAN broadcast manager protocol");
diff --git a/net/can/gw.c b/net/can/gw.c
index b54d5e6..4fe4fc4 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -58,7 +58,7 @@
 #include 
 
 #define CAN_GW_VERSION "20101209"
-static __initdata const char banner[] =
+static __initconst const char banner[] =
KERN_INFO "can: netlink gateway (rev " CAN_GW_VERSION ")\n";
 
 MODULE_DESCRIPTION("PF_CAN netlink gateway");
diff --git a/net/can/raw.c b/net/can/raw.c
index 3e9c893..5b0e3e3 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -55,7 +55,7 @@
 #include 
 
 #define CAN_RAW_VERSION CAN_VERSION
-static __initdata const char banner[] =
+static __initconst const char banner[] =
KERN_INFO "can: raw protocol (rev " CAN_RAW_VERSION ")\n";
 
 MODULE_DESCRIPTION("PF_CAN raw protocol");
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 14/31] sections: Fix section conflicts in drivers/hwmon

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/hwmon/coretemp.c |2 +-
 drivers/hwmon/w83627hf.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index faa16f8..0fa356f 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -196,7 +196,7 @@ struct tjmax {
int tjmax;
 };
 
-static struct tjmax __cpuinitconst tjmax_table[] = {
+static const struct tjmax __cpuinitconst tjmax_table[] = {
{ "CPU D410", 10 },
{ "CPU D425", 10 },
{ "CPU D510", 10 },
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index ab48252..5b1a6a6 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1206,7 +1206,7 @@ static int __init w83627hf_find(int sioaddr, unsigned 
short *addr,
int err = -ENODEV;
u16 val;
 
-   static const __initdata char *names[] = {
+   static __initconst char *const names[] = {
"W83627HF",
"W83627THF",
"W83697HF",
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

The PA-RISC tool chain seems to have some problem with correct read/write
attributes on sections. This causes problems when the const sections
are fixed up for other architecture to only contain truly read-only
data.

Disable const sections for PA-RISC

This can cause a bit of noise with modpost.

Cc: james.bottom...@hansenpartnership.com
Signed-off-by: Andi Kleen 
---
 arch/parisc/Kconfig  |4 
 include/linux/init.h |   27 +++
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b5..fbfeec9 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -243,6 +243,10 @@ config NODES_SHIFT
default "3"
depends on NEED_MULTIPLE_NODES
 
+config BROKEN_RODATA
+   bool
+   default y
+
 source "kernel/Kconfig.preempt"
 source "kernel/Kconfig.hz"
 source "mm/Kconfig"
diff --git a/include/linux/init.h b/include/linux/init.h
index 5e664f6..c2f06b3 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -43,10 +43,21 @@
discard it in modules) */
 #define __init __section(.init.text) __cold notrace
 #define __initdata __section(.init.data)
-#define __initconst__section(.init.rodata)
+#define __initconst__constsection(.init.rodata)
 #define __exitdata __section(.exit.data)
 #define __exit_call__used __section(.exitcall.exit)
 
+/* 
+ * Some architecture have tool chains which do not handle rodata attributes
+ * correctly. For those disable special sections for const, so that other
+ * architectures can annotate correctly.
+ */
+#ifdef CONFIG_BROKEN_RODATA
+#define __constsection(x)
+#else
+#define __constsection(x) __section(x)
+#endif
+
 /*
  * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -66,7 +77,7 @@
  */
 #define __ref__section(.ref.text) noinline
 #define __refdata__section(.ref.data)
-#define __refconst   __section(.ref.rodata)
+#define __refconst   __constsection(.ref.rodata)
 
 /* compatibility defines */
 #define __init_refok __ref
@@ -85,26 +96,26 @@
 /* Used for HOTPLUG */
 #define __devinit__section(.devinit.text) __cold notrace
 #define __devinitdata__section(.devinit.data)
-#define __devinitconst   __section(.devinit.rodata)
+#define __devinitconst   __constsection(.devinit.rodata)
 #define __devexit__section(.devexit.text) __exitused __cold notrace
 #define __devexitdata__section(.devexit.data)
-#define __devexitconst   __section(.devexit.rodata)
+#define __devexitconst   __constsection(.devexit.rodata)
 
 /* Used for HOTPLUG_CPU */
 #define __cpuinit__section(.cpuinit.text) __cold notrace
 #define __cpuinitdata__section(.cpuinit.data)
-#define __cpuinitconst   __section(.cpuinit.rodata)
+#define __cpuinitconst   __constsection(.cpuinit.rodata)
 #define __cpuexit__section(.cpuexit.text) __exitused __cold notrace
 #define __cpuexitdata__section(.cpuexit.data)
-#define __cpuexitconst   __section(.cpuexit.rodata)
+#define __cpuexitconst   __constsection(.cpuexit.rodata)
 
 /* Used for MEMORY_HOTPLUG */
 #define __meminit__section(.meminit.text) __cold notrace
 #define __meminitdata__section(.meminit.data)
-#define __meminitconst   __section(.meminit.rodata)
+#define __meminitconst   __constsection(.meminit.rodata)
 #define __memexit__section(.memexit.text) __exitused __cold notrace
 #define __memexitdata__section(.memexit.data)
-#define __memexitconst   __section(.memexit.rodata)
+#define __memexitconst   __constsection(.memexit.rodata)
 
 /* For assembly routines */
 #define __HEAD .section".head.text","ax"
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 12/31] sections: Fix section conflicts in drivers/char

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/char/mbcs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 47ff7e4..0c7d340 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -799,7 +799,7 @@ static int mbcs_remove(struct cx_dev *dev)
return 0;
 }
 
-static const struct cx_device_id __devinitdata mbcs_id_table[] = {
+static const struct cx_device_id __devinitconst mbcs_id_table[] = {
{
 .part_num = MBCS_PART_NUM,
 .mfg_num = MBCS_MFG_NUM,
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 19/31] sections: Fix section conflicts in drivers/misc

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/misc/pti.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index b7eb545..5cb61f7 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -76,7 +76,7 @@ struct pti_dev {
  */
 static DEFINE_MUTEX(alloclock);
 
-static struct pci_device_id pci_ids[] __devinitconst = {
+static const struct pci_device_id pci_ids[] __devinitconst = {
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x82B)},
{0}
 };
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 24/31] sections: Fix section conflicts in drivers/platform/x86

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/platform/x86/amilo-rfkill.c   |2 +-
 drivers/platform/x86/fujitsu-tablet.c |   10 +-
 drivers/platform/x86/thinkpad_acpi.c  |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/amilo-rfkill.c 
b/drivers/platform/x86/amilo-rfkill.c
index a514bf6..1deca7f 100644
--- a/drivers/platform/x86/amilo-rfkill.c
+++ b/drivers/platform/x86/amilo-rfkill.c
@@ -74,7 +74,7 @@ static const struct rfkill_ops amilo_m7440_rfkill_ops = {
.set_block = amilo_m7440_rfkill_set_block
 };
 
-static const struct dmi_system_id __devinitdata amilo_rfkill_id_table[] = {
+static const struct dmi_system_id __devinitconst amilo_rfkill_id_table[] = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
diff --git a/drivers/platform/x86/fujitsu-tablet.c 
b/drivers/platform/x86/fujitsu-tablet.c
index 7acae3f..f774845 100644
--- a/drivers/platform/x86/fujitsu-tablet.c
+++ b/drivers/platform/x86/fujitsu-tablet.c
@@ -52,7 +52,7 @@ struct fujitsu_config {
unsigned int quirks;
 };
 
-static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] __initconst = {
+static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] __initdata = {
KEY_RESERVED,
KEY_RESERVED,
KEY_RESERVED,
@@ -71,7 +71,7 @@ static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] 
__initconst = {
KEY_LEFTALT
 };
 
-static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] __initconst = {
+static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] __initdata = {
KEY_RESERVED,
KEY_RESERVED,
KEY_RESERVED,
@@ -90,7 +90,7 @@ static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] 
__initconst = {
KEY_LEFTALT
 };
 
-static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] __initconst = {
+static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] __initdata = {
KEY_RESERVED,
KEY_RESERVED,
KEY_RESERVED,
@@ -109,7 +109,7 @@ static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] 
__initconst = {
KEY_LEFTALT
 };
 
-static unsigned short keymap_Stylistic_ST5xxx[KEYMAP_LEN] __initconst = {
+static unsigned short keymap_Stylistic_ST5xxx[KEYMAP_LEN] __initdata = {
KEY_RESERVED,
KEY_RESERVED,
KEY_RESERVED,
@@ -299,7 +299,7 @@ static int __devinit fujitsu_dmi_stylistic(const struct 
dmi_system_id *dmi)
return 1;
 }
 
-static struct dmi_system_id dmi_ids[] __initconst = {
+static const struct dmi_system_id dmi_ids[] __initconst = {
{
.callback = fujitsu_dmi_lifebook,
.ident = "Fujitsu Siemens P/T Series",
diff --git a/drivers/platform/x86/thinkpad_acpi.c 
b/drivers/platform/x86/thinkpad_acpi.c
index f28f36c..b5528ce 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -522,7 +522,7 @@ static acpi_handle ec_handle;
 
 #define TPACPI_HANDLE(object, parent, paths...)\
static acpi_handle  object##_handle;\
-   static const acpi_handle *object##_parent __initdata =  \
+   static const acpi_handle * const object##_parent __initconst =  \
&parent##_handle; \
static char *object##_paths[] __initdata = { paths }
 
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 03/31] sections: Fix section conflicts in arch/frv

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 arch/frv/kernel/setup.c |2 +-
 arch/frv/mb93090-mb00/pci-irq.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 75cf7f4..1f1e5ef 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -184,7 +184,7 @@ static struct clock_cmode __pminitdata 
clock_cmodes_fr555[16] = {
[6] = { _x1,_x1_5,  _x1_5,  _x4_5,  _x0_375 },
 };
 
-static const struct clock_cmode __pminitdata *clock_cmodes;
+static const struct clock_cmode __pminitconst *clock_cmodes;
 static int __pminitdata clock_doubled;
 
 static struct uart_port __pminitdata __frv_uart0 = {
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 20f6497..c677b9d 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -28,7 +28,7 @@
  *
  */
 
-static const uint8_t __initdata pci_bus0_irq_routing[32][4] = {
+static const uint8_t __initconst pci_bus0_irq_routing[32][4] = {
[0 ] = { IRQ_FPGA_MB86943_PCI_INTA },
[16] = { IRQ_FPGA_RTL8029_INTA },
[17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, 
IRQ_FPGA_PCI_INTB },
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 27/31] sections: Fix section conflicts in mm/percpu

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 include/linux/percpu.h |2 +-
 mm/percpu.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 2b9f82c..cc88172 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -107,7 +107,7 @@ enum pcpu_fc {
 
PCPU_FC_NR,
 };
-extern const char *pcpu_fc_names[PCPU_FC_NR];
+extern const char * const pcpu_fc_names[PCPU_FC_NR];
 
 extern enum pcpu_fc pcpu_chosen_fc;
 
diff --git a/mm/percpu.c b/mm/percpu.c
index bb4be74..ddc5efb 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1370,7 +1370,7 @@ int __init pcpu_setup_first_chunk(const struct 
pcpu_alloc_info *ai,
 
 #ifdef CONFIG_SMP
 
-const char *pcpu_fc_names[PCPU_FC_NR] __initdata = {
+const char * const pcpu_fc_names[PCPU_FC_NR] __initconst = {
[PCPU_FC_AUTO]  = "auto",
[PCPU_FC_EMBED] = "embed",
[PCPU_FC_PAGE]  = "page",
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/31] sections: Fix section conflicts in drivers/atm

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/atm/eni.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 2059ee4..81e44f7 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1567,7 +1567,7 @@ tx_complete++;
 /*- entries -*/
 
 
-static const char *media_name[] __devinitdata = {
+static char * const media_name[] __devinitconst = {
 "MMF", "SMF", "MMF", "03?", /*  0- 3 */
 "UTP", "05?", "06?", "07?", /*  4- 7 */
 "TAXI","09?", "10?", "11?", /*  8-11 */
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 29/31] sections: Fix section conflicts in net

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 include/net/net_namespace.h |2 ++
 net/decnet/dn_rules.c   |2 +-
 net/ipv4/fib_rules.c|2 +-
 net/ipv4/ipmr.c |2 +-
 net/ipv6/addrlabel.c|2 +-
 net/ipv6/fib6_rules.c   |2 +-
 net/ipv6/ip6mr.c|2 +-
 7 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index ae1cd6c..857c95d 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -241,10 +241,12 @@ static inline struct net *read_pnet(struct net * const 
*pnet)
 #define __net_init
 #define __net_exit
 #define __net_initdata
+#define __net_initconst
 #else
 #define __net_init __init
 #define __net_exit __exit_refok
 #define __net_initdata __initdata
+#define __net_initconst__initconst
 #endif
 
 struct pernet_operations {
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index e65f2c8..faf7cc3 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -220,7 +220,7 @@ static void dn_fib_rule_flush_cache(struct fib_rules_ops 
*ops)
dn_rt_cache_flush(-1);
 }
 
-static const struct fib_rules_ops __net_initdata dn_fib_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst dn_fib_rules_ops_template = {
.family = AF_DECnet,
.rule_size  = sizeof(struct dn_fib_rule),
.addr_size  = sizeof(u16),
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index a83d74e..97b9fb9 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -262,7 +262,7 @@ static void fib4_rule_flush_cache(struct fib_rules_ops *ops)
rt_cache_flush(ops->fro_net, -1);
 }
 
-static const struct fib_rules_ops __net_initdata fib4_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst fib4_rules_ops_template = {
.family = AF_INET,
.rule_size  = sizeof(struct fib4_rule),
.addr_size  = sizeof(u32),
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 8eec8f4..5f9ebb9 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -218,7 +218,7 @@ static int ipmr_rule_fill(struct fib_rule *rule, struct 
sk_buff *skb,
return 0;
 }
 
-static const struct fib_rules_ops __net_initdata ipmr_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst ipmr_rules_ops_template = {
.family = RTNL_FAMILY_IPMR,
.rule_size  = sizeof(struct ipmr_rule),
.addr_size  = sizeof(u32),
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index eb6a636..c66c38b 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -75,7 +75,7 @@ struct net *ip6addrlbl_net(const struct ip6addrlbl_entry *lbl)
 
 #define IPV6_ADDR_LABEL_DEFAULT0xUL
 
-static const __net_initdata struct ip6addrlbl_init_table
+static const __net_initconst struct ip6addrlbl_init_table
 {
const struct in6_addr *prefix;
int prefixlen;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 0ff1cfd..d9fb911 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -238,7 +238,7 @@ static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
   + nla_total_size(16); /* src */
 }
 
-static const struct fib_rules_ops __net_initdata fib6_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = {
.family = AF_INET6,
.rule_size  = sizeof(struct fib6_rule),
.addr_size  = sizeof(struct in6_addr),
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 4532973..87ecc67 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -205,7 +205,7 @@ static int ip6mr_rule_fill(struct fib_rule *rule, struct 
sk_buff *skb,
return 0;
 }
 
-static const struct fib_rules_ops __net_initdata ip6mr_rules_ops_template = {
+static const struct fib_rules_ops __net_initconst ip6mr_rules_ops_template = {
.family = RTNL_FAMILY_IP6MR,
.rule_size  = sizeof(struct ip6mr_rule),
.addr_size  = sizeof(struct in6_addr),
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 30/31] sections: Fix section conflicts in sound

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 sound/soc/codecs/wm5100.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index f481729..aa62c0e 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -1233,7 +1233,7 @@ static const struct snd_soc_dapm_route 
wm5100_dapm_routes[] = {
{ "PWM2", NULL, "PWM2 Driver" },
 };
 
-static const __devinitdata struct reg_default wm5100_reva_patches[] = {
+static const __devinitconst struct reg_default wm5100_reva_patches[] = {
{ WM5100_AUDIO_IF_1_10, 0 },
{ WM5100_AUDIO_IF_1_11, 1 },
{ WM5100_AUDIO_IF_1_12, 2 },
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 20/31] sections: Fix section conflicts in drivers/mmc

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

Signed-off-by: Andi Kleen 
---
 drivers/mmc/host/sdhci-pci.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 504da71..9722d43 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -653,7 +653,7 @@ static const struct sdhci_pci_fixes sdhci_via = {
.probe  = via_probe,
 };
 
-static const struct pci_device_id pci_ids[] __devinitdata = {
+static const struct pci_device_id pci_ids[] __devinitconst = {
{
.vendor = PCI_VENDOR_ID_RICOH,
.device = PCI_DEVICE_ID_RICOH_R5C822,
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   >