LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 4/4] perf: Create a sysfs entry for Power event format
From: Jiri Olsa @ 2012-11-14 10:27 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Peter Zijlstra, robert.richter, Anton Blanchard, linux-kernel,
	linuxppc-dev, Ingo Molnar, Paul Mackerras,
	Arnaldo Carvalho de Melo
In-Reply-To: <20121107191951.GD16211@us.ibm.com>

On Wed, Nov 07, 2012 at 11:19:52AM -0800, Sukadev Bhattiprolu wrote:
> 
> From bafc551c31ce23c1cba0b75d23de6c46aba90f26 Mon Sep 17 00:00:00 2001
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Date: Tue, 6 Nov 2012 16:30:28 -0800
> Subject: [PATCH 4/4] perf: Create a sysfs entry for Power event format
> 
> Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event'
> which describes the format of a POWER cpu.
> 
> 	$ cat /sys/bus/event_source/devices/cpu/format/event
> 	config:0-20
> 
> The format of the event is the same for all POWER cpus, so bulk of this
> change is in the code common to POWER cpus.
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
>  arch/powerpc/include/asm/perf_event_server.h |    8 ++++++++
>  arch/powerpc/perf/core-book3s.c              |   19 +++++++++++++++++++
>  arch/powerpc/perf/power7-pmu.c               |    1 +
>  3 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h
> index ad84f73..20a49bf 100644
> --- a/arch/powerpc/include/asm/perf_event_server.h
> +++ b/arch/powerpc/include/asm/perf_event_server.h
> @@ -130,3 +130,11 @@ extern ssize_t power_events_sysfs_show(struct device *dev,
>  		.attr = __ATTR(_name, 0444, power_events_sysfs_show, NULL),\
>  		.id   = PM_##_id,                                               \
>  	};
> +
> +/*
> + * Format of a perf event is the same on all POWER cpus. Declare a
> + * common sysfs attribute group that individual POWER cpus can share.
> + */
> +extern struct attribute_group power_pmu_format_group;
> +
> +
> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index 19b23bd..388e2a1 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -1315,6 +1315,25 @@ ssize_t power_events_sysfs_show(struct device *dev,
>         return sprintf(page, "event=0x%02llx\n", pmu_attr->id);
>  }
>  
> +static ssize_t power_config_sysfs_show(struct device *dev,
> +				struct device_attribute *attr, char *page)
> +{
> +	return sprintf(page, "config:0-20\n");
> +}
> +
> +static struct device_attribute config_dev_attr = \
> +			__ATTR(event, 0444, power_config_sysfs_show, NULL);

there's PMU_FORMAT_ATTR in include/linux/perf_event.h macro doing this

jirka

^ permalink raw reply

* Re: [PATCH 3/4] perf/POWER7: Make event translations available in sysfs
From: Jiri Olsa @ 2012-11-14 10:25 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Peter Zijlstra, robert.richter, Anton Blanchard, linux-kernel,
	linuxppc-dev, Ingo Molnar, Paul Mackerras,
	Arnaldo Carvalho de Melo
In-Reply-To: <20121107191927.GC16211@us.ibm.com>

On Wed, Nov 07, 2012 at 11:19:28AM -0800, Sukadev Bhattiprolu wrote:

SNIP

> +struct perf_pmu_events_attr {
> +	struct device_attribute attr;
> +	u64 id;
> +};
> +
> +extern ssize_t power_events_sysfs_show(struct device *dev,
> +				struct device_attribute *attr, char *page);
> +
> +#define EVENT_VAR(_id)	event_attr_##_id
> +#define EVENT_PTR(_id) &event_attr_##_id.attr.attr
> +
> +#define EVENT_ATTR(_name, _id)                                             \
> +	static struct perf_pmu_events_attr EVENT_VAR(_id) = {              \
> +		.attr = __ATTR(_name, 0444, power_events_sysfs_show, NULL),\
> +		.id   = PM_##_id,                                               \
> +	};

this is duplicating the x86 code, perhaps it could be moved
to include/linux/perf_event.h and shared globaly


> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index aa2465e..19b23bd 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -1305,6 +1305,16 @@ static int power_pmu_event_idx(struct perf_event *event)
>  	return event->hw.idx;
>  }
>  
> +ssize_t power_events_sysfs_show(struct device *dev,
> +				struct device_attribute *attr, char *page)
> +{
> +       struct perf_pmu_events_attr *pmu_attr;
> +       
> +       pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);
> +        
> +       return sprintf(page, "event=0x%02llx\n", pmu_attr->id);

whitespace issues


jirka

^ permalink raw reply

* Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely
From: Jiri Slaby @ 2012-11-14  9:45 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, alan, anton, gregkh
In-Reply-To: <20121114081547.GA573@bloggs.ozlabs.ibm.com>

On 11/14/2012 09:15 AM, Paul Mackerras wrote:
> Commit bdb498c20040 "TTY: hvc_console, add tty install" took the port
> refcounting out of hvc_open()/hvc_close(), but failed to remove the
> kref_put() and tty_kref_put() calls in hvc_hangup() that were there to
> remove the extra references that hvc_open() had taken.
> 
> The result was that doing a vhangup() when the current terminal was
> a hvc_console, then closing the current terminal, would end up calling
> destroy_hvc_struct() and making the port disappear entirely.  This
> meant that Fedora 17 systems would boot up but then not display the
> login prompt on the console, and attempts to open /dev/hvc0 would
> give a "No such device" error.
> 
> This fixes it by removing the extra kref_put() and tty_kref_put() calls.

Oh yeah. Thanks.

Acked-by: Jiri Slaby <jslaby@suse.cz>

> Signed-off-by: Paul Mackerras <paulus@samba.org>
> Cc: stable@vger.kernel.org
> ---
>  drivers/tty/hvc/hvc_console.c |    7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
> index a5dec1c..13ee53b 100644
> --- a/drivers/tty/hvc/hvc_console.c
> +++ b/drivers/tty/hvc/hvc_console.c
> @@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty)
>  {
>  	struct hvc_struct *hp = tty->driver_data;
>  	unsigned long flags;
> -	int temp_open_count;
>  
>  	if (!hp)
>  		return;
> @@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty)
>  		return;
>  	}
>  
> -	temp_open_count = hp->port.count;
>  	hp->port.count = 0;
>  	spin_unlock_irqrestore(&hp->port.lock, flags);
>  	tty_port_tty_set(&hp->port, NULL);
> @@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty)
>  
>  	if (hp->ops->notifier_hangup)
>  		hp->ops->notifier_hangup(hp, hp->data);
> -
> -	while(temp_open_count) {
> -		--temp_open_count;
> -		tty_port_put(&hp->port);
> -	}
>  }
>  
>  /*
> 


-- 
js
suse labs

^ permalink raw reply

* Re: [PATCH 0/1] powerpc/vdso: remove redundant locking in update_vsyscall_tz()
From: Shan Hai @ 2012-11-14  9:39 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, john.stultz
In-Reply-To: <20121109015718.GA6124@debian.corp.ad.wrs.com>

On Fri, Nov 09, 2012 at 09:57:49AM +0800, Shan Hai wrote:
> The locking in update_vsyscall_tz() is not only unnecessary because the vdso
> code copies the data unproteced in __kernel_gettimeofday() but also
> introduces a hard to reproduce race condition between update_vsyscall()
> and update_vsyscall_tz(), which causes user space process to loop
> forever in vdso code.
> 
> The following patch removes the locking from update_vsyscall_tz().
> 
> ---
>  arch/powerpc/kernel/time.c |    5 -----
>  1 file changed, 5 deletions(-)
>

Hi Ben,

Would you please review this one?
 
>From 167eac293b07e0ee201ffe5043ec442d52495a48 Mon Sep 17 00:00:00 2001
From: Shan Hai <shan.hai@windriver.com>
Date: Mon, 5 Nov 2012 18:24:22 +0800
Subject: [PATCH 1/1] powerpc/vdso: remove redundant locking in
 update_vsyscall_tz()

Locking is not only unnecessary because the vdso code copies the data
unprotected in __kernel_gettimeofday() but also erroneous because updating
the tb_update_count is not atomic and introduces a hard to reproduce race
condition between update_vsyscall() and update_vsyscall_tz(), which further
causes user space process to loop forever in vdso code.

The below scenario describes the race condition,
x==0	Boot CPU			other CPU
	proc_P: x==0
	    timer interrupt
		update_vsyscall
x==1		    x++;sync		settimeofday
					    update_vsyscall_tz
x==2						x++;sync
x==3		    sync;x++
						sync;x++
	proc_P: x==3 (loops until x becomes even)

Because the ++ operator would be implemented as three instructions and not
atomic on powerpc.

A similar change was made for x86 in commit 6c260d58634
("x86: vdso: Remove bogus locking in update_vsyscall_tz")

Signed-off-by: Shan Hai <shan.hai@windriver.com>
---
 arch/powerpc/kernel/time.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 03b29a6..426141f 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -859,13 +859,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
 
 void update_vsyscall_tz(void)
 {
-	/* Make userspace gettimeofday spin until we're done. */
-	++vdso_data->tb_update_count;
-	smp_mb();
 	vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
 	vdso_data->tz_dsttime = sys_tz.tz_dsttime;
-	smp_mb();
-	++vdso_data->tb_update_count;
 }
 
 static void __init clocksource_init(void)
-- 
1.7.10.4

Best Regards
Shan Hai

> Thanks
> Shan Hai

> From 167eac293b07e0ee201ffe5043ec442d52495a48 Mon Sep 17 00:00:00 2001
> From: Shan Hai <shan.hai@windriver.com>
> Date: Mon, 5 Nov 2012 18:24:22 +0800
> Subject: [PATCH 1/1] powerpc/vdso: remove redundant locking in
>  update_vsyscall_tz()
> 
> Locking is not only unnecessary because the vdso code copies the data
> unprotected in __kernel_gettimeofday() but also erroneous because updating
> the tb_update_count is not atomic and introduces a hard to reproduce race
> condition between update_vsyscall() and update_vsyscall_tz(), which further
> causes user space process to loop forever in vdso code.
> 
> The below scenario describes the race condition,
> x==0	Boot CPU			other CPU
> 	proc_P: x==0
> 	    timer interrupt
> 		update_vsyscall
> x==1		    x++;sync		settimeofday
> 					    update_vsyscall_tz
> x==2						x++;sync
> x==3		    sync;x++
> 						sync;x++
> 	proc_P: x==3 (loops until x becomes even)
> 
> Because the ++ operator would be implemented as three instructions and not
> atomic on powerpc.
> 
> A similar change was made for x86 in commit 6c260d58634
> ("x86: vdso: Remove bogus locking in update_vsyscall_tz")
> 
> Signed-off-by: Shan Hai <shan.hai@windriver.com>
> ---
>  arch/powerpc/kernel/time.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 03b29a6..426141f 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -859,13 +859,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
>  
>  void update_vsyscall_tz(void)
>  {
> -	/* Make userspace gettimeofday spin until we're done. */
> -	++vdso_data->tb_update_count;
> -	smp_mb();
>  	vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
>  	vdso_data->tz_dsttime = sys_tz.tz_dsttime;
> -	smp_mb();
> -	++vdso_data->tb_update_count;
>  }
>  
>  static void __init clocksource_init(void)
> -- 
> 1.7.10.4
> 

> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply related

* [patch 4/4] mm, oom: remove statically defined arch functions of same name
From: David Rientjes @ 2012-11-14  9:15 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Mundt, linux-sh, Greg Kroah-Hartman, x86, linux-kernel,
	Michal Hocko, linux-mm, Ingo Molnar, Paul Mackerras,
	KOSAKI Motohiro, H. Peter Anvin, Thomas Gleixner, linuxppc-dev,
	KAMEZAWA Hiroyuki
In-Reply-To: <alpine.DEB.2.00.1211140111190.32125@chino.kir.corp.google.com>

out_of_memory() is a globally defined function to call the oom killer.
x86, sh, and powerpc all use a function of the same name within file
scope in their respective fault.c unnecessarily.  Inline the functions
into the pagefault handlers to clean the code up.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 arch/powerpc/mm/fault.c |   27 ++++++++++++---------------
 arch/sh/mm/fault.c      |   19 +++++++------------
 arch/x86/mm/fault.c     |   23 ++++++++---------------
 3 files changed, 27 insertions(+), 42 deletions(-)

diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -113,19 +113,6 @@ static int store_updates_sp(struct pt_regs *regs)
 #define MM_FAULT_CONTINUE	-1
 #define MM_FAULT_ERR(sig)	(sig)
 
-static int out_of_memory(struct pt_regs *regs)
-{
-	/*
-	 * We ran out of memory, or some other thing happened to us that made
-	 * us unable to handle the page fault gracefully.
-	 */
-	up_read(&current->mm->mmap_sem);
-	if (!user_mode(regs))
-		return MM_FAULT_ERR(SIGKILL);
-	pagefault_out_of_memory();
-	return MM_FAULT_RETURN;
-}
-
 static int do_sigbus(struct pt_regs *regs, unsigned long address)
 {
 	siginfo_t info;
@@ -169,8 +156,18 @@ static int mm_fault_error(struct pt_regs *regs, unsigned long addr, int fault)
 		return MM_FAULT_CONTINUE;
 
 	/* Out of memory */
-	if (fault & VM_FAULT_OOM)
-		return out_of_memory(regs);
+	if (fault & VM_FAULT_OOM) {
+		up_read(&current->mm->mmap_sem);
+
+		/*
+		 * We ran out of memory, or some other thing happened to us that
+		 * made us unable to handle the page fault gracefully.
+		 */
+		if (!user_mode(regs))
+			return MM_FAULT_ERR(SIGKILL);
+		pagefault_out_of_memory();
+		return MM_FAULT_RETURN;
+	}
 
 	/* Bus error. x86 handles HWPOISON here, we'll add this if/when
 	 * we support the feature in HW
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -301,17 +301,6 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code,
 	__bad_area(regs, error_code, address, SEGV_ACCERR);
 }
 
-static void out_of_memory(void)
-{
-	/*
-	 * We ran out of memory, call the OOM killer, and return the userspace
-	 * (which will retry the fault, or kill us if we got oom-killed):
-	 */
-	up_read(&current->mm->mmap_sem);
-
-	pagefault_out_of_memory();
-}
-
 static void
 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address)
 {
@@ -353,8 +342,14 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
 			no_context(regs, error_code, address);
 			return 1;
 		}
+		up_read(&current->mm->mmap_sem);
 
-		out_of_memory();
+		/*
+		 * We ran out of memory, call the OOM killer, and return the
+		 * userspace (which will retry the fault, or kill us if we got
+		 * oom-killed):
+		 */
+		pagefault_out_of_memory();
 	} else {
 		if (fault & VM_FAULT_SIGBUS)
 			do_sigbus(regs, error_code, address);
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -803,20 +803,6 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code,
 	__bad_area(regs, error_code, address, SEGV_ACCERR);
 }
 
-/* TODO: fixup for "mm-invoke-oom-killer-from-page-fault.patch" */
-static void
-out_of_memory(struct pt_regs *regs, unsigned long error_code,
-	      unsigned long address)
-{
-	/*
-	 * We ran out of memory, call the OOM killer, and return the userspace
-	 * (which will retry the fault, or kill us if we got oom-killed):
-	 */
-	up_read(&current->mm->mmap_sem);
-
-	pagefault_out_of_memory();
-}
-
 static void
 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
 	  unsigned int fault)
@@ -879,7 +865,14 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
 			return 1;
 		}
 
-		out_of_memory(regs, error_code, address);
+		up_read(&current->mm->mmap_sem);
+
+		/*
+		 * We ran out of memory, call the OOM killer, and return the
+		 * userspace (which will retry the fault, or kill us if we got
+		 * oom-killed):
+		 */
+		pagefault_out_of_memory();
 	} else {
 		if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
 			     VM_FAULT_HWPOISON_LARGE))

^ permalink raw reply

* Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock
From: Deepthi Dharwar @ 2012-11-14  9:06 UTC (permalink / raw)
  To: Julius Werner
  Cc: Kevin Hilman, Trinabh Gupta, linux-pm, Daniel Lezcano,
	linux-kernel, Rafael J. Wysocki, linux-acpi, Srivatsa S. Bhat,
	Andrew Morton, linuxppc-dev, Sameer Nanda, Len Brown
In-Reply-To: <1352843563-16392-1-git-send-email-jwerner@chromium.org>

On 11/14/2012 03:22 AM, Julius Werner wrote:
> Many cpuidle drivers measure their time spent in an idle state by
> reading the wallclock time before and after idling and calculating the
> difference. This leads to erroneous results when the wallclock time gets
> updated by another processor in the meantime, adding that clock
> adjustment to the idle state's time counter.
> 
> If the clock adjustment was negative, the result is even worse due to an
> erroneous cast from int to unsigned long long of the last_residency
> variable. The negative 32 bit integer will zero-extend and result in a
> forward time jump of roughly four billion milliseconds or 1.3 hours on
> the idle state residency counter.
> 
> This patch changes all affected cpuidle drivers to use the monotonic
> clock for their measurements instead. It also removes the erroneous
> cast, making sure that negative residency values are applied correctly
> even though they should not appear anymore.

Currently tegra/cpuidle uses ktime_get(). Good to have it for all
the other arch idle residency time logging too.
Tested patch on pseries.

Reviewed-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>

Cheers,
Deepthi

> 
> Signed-off-by: Julius Werner <jwerner@chromium.org>
> ---
>  arch/powerpc/platforms/pseries/processor_idle.c |    4 ++--
>  drivers/acpi/processor_idle.c                   |   12 ++++++------
>  drivers/cpuidle/cpuidle.c                       |    3 +--
>  drivers/idle/intel_idle.c                       |   13 ++++---------
>  4 files changed, 13 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
> index 45d00e5..4d806b4 100644
> --- a/arch/powerpc/platforms/pseries/processor_idle.c
> +++ b/arch/powerpc/platforms/pseries/processor_idle.c
> @@ -36,7 +36,7 @@ static struct cpuidle_state *cpuidle_state_table;
>  static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
>  {
> 
> -	*kt_before = ktime_get_real();
> +	*kt_before = ktime_get();
>  	*in_purr = mfspr(SPRN_PURR);
>  	/*
>  	 * Indicate to the HV that we are idle. Now would be
> @@ -50,7 +50,7 @@ static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
>  	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
>  	get_lppaca()->idle = 0;
> 
> -	return ktime_to_us(ktime_sub(ktime_get_real(), kt_before));
> +	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
>  }
> 
>  static int snooze_loop(struct cpuidle_device *dev,
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index e8086c7..8c98d73 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -751,9 +751,9 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
> 
> 
>  	lapic_timer_state_broadcast(pr, cx, 1);
> -	kt1 = ktime_get_real();
> +	kt1 = ktime_get();
>  	acpi_idle_do_entry(cx);
> -	kt2 = ktime_get_real();
> +	kt2 = ktime_get();
>  	idle_time =  ktime_to_us(ktime_sub(kt2, kt1));
> 
>  	/* Update device last_residency*/
> @@ -843,11 +843,11 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
>  	if (cx->type == ACPI_STATE_C3)
>  		ACPI_FLUSH_CPU_CACHE();
> 
> -	kt1 = ktime_get_real();
> +	kt1 = ktime_get();
>  	/* Tell the scheduler that we are going deep-idle: */
>  	sched_clock_idle_sleep_event();
>  	acpi_idle_do_entry(cx);
> -	kt2 = ktime_get_real();
> +	kt2 = ktime_get();
>  	idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
>  	idle_time = idle_time_ns;
>  	do_div(idle_time, NSEC_PER_USEC);
> @@ -934,7 +934,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
>  	 */
>  	lapic_timer_state_broadcast(pr, cx, 1);
> 
> -	kt1 = ktime_get_real();
> +	kt1 = ktime_get();
>  	/*
>  	 * disable bus master
>  	 * bm_check implies we need ARB_DIS
> @@ -965,7 +965,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
>  		c3_cpu_count--;
>  		raw_spin_unlock(&c3_lock);
>  	}
> -	kt2 = ktime_get_real();
> +	kt2 = ktime_get();
>  	idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
>  	idle_time = idle_time_ns;
>  	do_div(idle_time, NSEC_PER_USEC);
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 7f15b85..1536edd 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -109,8 +109,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
>  		/* This can be moved to within driver enter routine
>  		 * but that results in multiple copies of same code.
>  		 */
> -		dev->states_usage[entered_state].time +=
> -				(unsigned long long)dev->last_residency;
> +		dev->states_usage[entered_state].time += dev->last_residency;
>  		dev->states_usage[entered_state].usage++;
>  	} else {
>  		dev->last_residency = 0;
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index b0f6b4c..6329a97 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -56,7 +56,7 @@
>  #include <linux/kernel.h>
>  #include <linux/cpuidle.h>
>  #include <linux/clockchips.h>
> -#include <linux/hrtimer.h>	/* ktime_get_real() */
> +#include <linux/hrtimer.h>	/* ktime_get() */
>  #include <trace/events/power.h>
>  #include <linux/sched.h>
>  #include <linux/notifier.h>
> @@ -281,8 +281,7 @@ static int intel_idle(struct cpuidle_device *dev,
>  	struct cpuidle_state_usage *state_usage = &dev->states_usage[index];
>  	unsigned long eax = (unsigned long)cpuidle_get_statedata(state_usage);
>  	unsigned int cstate;
> -	ktime_t kt_before, kt_after;
> -	s64 usec_delta;
> +	ktime_t kt_before;
>  	int cpu = smp_processor_id();
> 
>  	cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
> @@ -297,7 +296,7 @@ static int intel_idle(struct cpuidle_device *dev,
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
> 
> -	kt_before = ktime_get_real();
> +	kt_before = ktime_get();
> 
>  	stop_critical_timings();
>  	if (!need_resched()) {
> @@ -310,17 +309,13 @@ static int intel_idle(struct cpuidle_device *dev,
> 
>  	start_critical_timings();
> 
> -	kt_after = ktime_get_real();
> -	usec_delta = ktime_to_us(ktime_sub(kt_after, kt_before));
> +	dev->last_residency = ktime_to_us(ktime_sub(ktime_get(), kt_before));
> 
>  	local_irq_enable();
> 
>  	if (!(lapic_timer_reliable_states & (1 << (cstate))))
>  		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
> 
> -	/* Update cpuidle counters */
> -	dev->last_residency = (int)usec_delta;
> -
>  	return index;
>  }
> 

^ permalink raw reply

* [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely
From: Paul Mackerras @ 2012-11-14  8:15 UTC (permalink / raw)
  To: jslaby, benh, anton, gregkh, alan; +Cc: linuxppc-dev

Commit bdb498c20040 "TTY: hvc_console, add tty install" took the port
refcounting out of hvc_open()/hvc_close(), but failed to remove the
kref_put() and tty_kref_put() calls in hvc_hangup() that were there to
remove the extra references that hvc_open() had taken.

The result was that doing a vhangup() when the current terminal was
a hvc_console, then closing the current terminal, would end up calling
destroy_hvc_struct() and making the port disappear entirely.  This
meant that Fedora 17 systems would boot up but then not display the
login prompt on the console, and attempts to open /dev/hvc0 would
give a "No such device" error.

This fixes it by removing the extra kref_put() and tty_kref_put() calls.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: stable@vger.kernel.org
---
 drivers/tty/hvc/hvc_console.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index a5dec1c..13ee53b 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty)
 {
 	struct hvc_struct *hp = tty->driver_data;
 	unsigned long flags;
-	int temp_open_count;
 
 	if (!hp)
 		return;
@@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty)
 		return;
 	}
 
-	temp_open_count = hp->port.count;
 	hp->port.count = 0;
 	spin_unlock_irqrestore(&hp->port.lock, flags);
 	tty_port_tty_set(&hp->port, NULL);
@@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty)
 
 	if (hp->ops->notifier_hangup)
 		hp->ops->notifier_hangup(hp, hp->data);
-
-	while(temp_open_count) {
-		--temp_open_count;
-		tty_port_put(&hp->port);
-	}
 }
 
 /*
-- 
1.7.10.rc3.219.g53414

^ permalink raw reply related

* Re: HVC console breakage
From: Benjamin Herrenschmidt @ 2012-11-14  4:13 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: linuxppc-dev, paulus, gregkh, Paul Mackerras, jslaby, alan
In-Reply-To: <20121114135702.7b332dd7@kryten>

On Wed, 2012-11-14 at 13:57 +1100, Anton Blanchard wrote:
> Hi,
> 
> Commit bdb498c20040 (TTY: hvc_console, add tty install) breaks HVC on
> ppc64. It looks a bit like a refcounting issue and we end up releasing
> the tty. I haven't had a change to look closer yet.

Adding Paulus who is looking into it. So far what we observe is that
something (possibly a close() on a hvc tty by userspace) causes the port
to be destroyed permanently. Typically hits with fedora 17.

Cheers,
Ben.

^ permalink raw reply

* HVC console breakage
From: Anton Blanchard @ 2012-11-14  2:57 UTC (permalink / raw)
  To: jslaby, benh, paulus, gregkh, alan; +Cc: linuxppc-dev


Hi,

Commit bdb498c20040 (TTY: hvc_console, add tty install) breaks HVC on
ppc64. It looks a bit like a refcounting issue and we end up releasing
the tty. I haven't had a change to look closer yet.

Anton

^ permalink raw reply

* Re: [PATCH 1/1] arch Kconfig: remove references to IRQ_PER_CPU
From: Richard Kuo @ 2012-11-14  0:53 UTC (permalink / raw)
  To: James Hogan
  Cc: linux-arch, linux-mips, Tony Luck, linux-ia64, linux-parisc,
	linux-sh, linux-hexagon, Helge Deller, linux-kernel, Fenghua Yu,
	James E.J. Bottomley, Paul Mundt, Mike Frysinger, Ralf Baechle,
	uclinux-dist-devel, Thomas Gleixner, linuxppc-dev, Paul Mackerras
In-Reply-To: <1352807948-26920-1-git-send-email-james.hogan@imgtec.com>

On Tue, Nov 13, 2012 at 11:59:08AM +0000, James Hogan wrote:
> The IRQ_PER_CPU Kconfig symbol was removed in the following commit:
> 
> Commit 6a58fb3bad099076f36f0f30f44507bc3275cdb6 ("genirq: Remove
> CONFIG_IRQ_PER_CPU") merged in v2.6.39-rc1.
> 
> But IRQ_PER_CPU wasn't removed from any of the architecture Kconfig
> files where it was defined or selected. It's completely unused so remove
> the remaining references.
> 
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mike Frysinger <vapier@gentoo.org>
> Cc: Richard Kuo <rkuo@codeaurora.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
> Cc: Helge Deller <deller@gmx.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Paul Mundt <lethal@linux-sh.org>
> ---
> Based on v3.7-rc5.
> 
> Compile tested defconfigs for bfin, ia64, mips, parisc, powerpc, sh, but
> not hexagon.
> 
> Grepped entire tree to check no references to CONFIG_IRQ_PER_CPU, and
> grepped arch/ for Kconfig files referencing IRQ_PER_CPU.
> 
>  arch/blackfin/Kconfig |    1 -
>  arch/hexagon/Kconfig  |    1 -
>  arch/ia64/Kconfig     |    1 -
>  arch/mips/Kconfig     |    1 -
>  arch/parisc/Kconfig   |    1 -
>  arch/powerpc/Kconfig  |    1 -
>  arch/sh/Kconfig       |    3 ---
>  7 files changed, 0 insertions(+), 9 deletions(-)
> 

Hexagon's was commented out anyways, but thanks for pointing it out.

Acked-by: Richard Kuo <rkuo@codeaurora.org>

-- 

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply

* Re: [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: Joe Perches @ 2012-11-13 22:32 UTC (permalink / raw)
  To: David Miller
  Cc: linux-mips, linux-doc, jcmvbkbc, harryxiyou, paulus, linux,
	richard, linux-xtensa, rob, user-mode-linux-devel, jdike,
	xiyoulinuxkernelgroup, user-mode-linux-user, linux-arm-kernel,
	chris, isdn, netdev, linux-kernel, ralf, linux-kernel,
	linuxppc-dev
In-Reply-To: <20121113.171736.561094209116852795.davem@davemloft.net>

On Tue, 2012-11-13 at 17:17 -0500, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Tue, 13 Nov 2012 12:17:25 -0800
> 
> > That seems an odd workflow as it leaves dangling CONFIG_<foo>
> > options set, but I guess it doesn't hurt so here it is.
> 
> As you said it's harmless, and more importantly it avoids
> unnecessary conflicts.
> 
> > I just removed the modified arch/.../<foo>defconfig files.
> 
> Something is not right here:

> [davem@drr net-next]$ git am --signoff V2-wanrouter-Remove-it-and-the-drivers-that-depend-on-it.patch 
> Applying: wanrouter: Remove it and the drivers that depend on it
> error: removal patch leaves file contents
> error: net/wanrouter/Kconfig: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/Makefile: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/patchlevel: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/wanmain.c: patch does not apply
> error: removal patch leaves file contents
> error: net/wanrouter/wanproc.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_drv.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_main.c: patch does not apply
> error: removal patch leaves file contents
> error: drivers/net/wan/cycx_x25.c: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/cyclomx.h: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/cycx_drv.h: patch does not apply
> error: removal patch leaves file contents
> error: include/linux/wanrouter.h: patch does not apply
> error: removal patch leaves file contents
> error: include/uapi/linux/wanrouter.h: patch does not apply

Right, that is unexpected/odd/interesting.

I was trying to save mailing list bandwidth by reducing
the patch size.

I generated this with
	$ git format-patch -M -D
but it doesn't apply here either. :(

Using
	$ git format-patch -M
does apply correctly.

It's quite a bit larger though. (120KB vs 14)
I'll send the large patch just to netdev.

Joe

^ permalink raw reply

* Re: [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: David Miller @ 2012-11-13 22:17 UTC (permalink / raw)
  To: joe
  Cc: linux-mips, linux-doc, jcmvbkbc, harryxiyou, paulus, linux,
	richard, linux-xtensa, rob, user-mode-linux-devel, jdike,
	xiyoulinuxkernelgroup, user-mode-linux-user, linux-arm-kernel,
	chris, isdn, netdev, linux-kernel, ralf, linux-kernel,
	linuxppc-dev
In-Reply-To: <1352837845.12850.3.camel@joe-AO722>

From: Joe Perches <joe@perches.com>
Date: Tue, 13 Nov 2012 12:17:25 -0800

> That seems an odd workflow as it leaves dangling CONFIG_<foo>
> options set, but I guess it doesn't hurt so here it is.

As you said it's harmless, and more importantly it avoids
unnecessary conflicts.

> I just removed the modified arch/.../<foo>defconfig files.

Something is not right here:

[davem@drr net-next]$ git am --signoff V2-wanrouter-Remove-it-and-the-drivers-that-depend-on-it.patch 
Applying: wanrouter: Remove it and the drivers that depend on it
error: removal patch leaves file contents
error: net/wanrouter/Kconfig: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/Makefile: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/patchlevel: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/wanmain.c: patch does not apply
error: removal patch leaves file contents
error: net/wanrouter/wanproc.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_drv.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_main.c: patch does not apply
error: removal patch leaves file contents
error: drivers/net/wan/cycx_x25.c: patch does not apply
error: removal patch leaves file contents
error: include/linux/cyclomx.h: patch does not apply
error: removal patch leaves file contents
error: include/linux/cycx_drv.h: patch does not apply
error: removal patch leaves file contents
error: include/linux/wanrouter.h: patch does not apply
error: removal patch leaves file contents
error: include/uapi/linux/wanrouter.h: patch does not apply

^ permalink raw reply

* [PATCH] cpuidle: Measure idle state durations with monotonic clock
From: Julius Werner @ 2012-11-13 21:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kevin Hilman, Deepthi Dharwar, Trinabh Gupta, linux-pm,
	Daniel Lezcano, Rafael J. Wysocki, linux-acpi, Srivatsa S. Bhat,
	Julius Werner, Andrew Morton, linuxppc-dev, Sameer Nanda,
	Len Brown

Many cpuidle drivers measure their time spent in an idle state by
reading the wallclock time before and after idling and calculating the
difference. This leads to erroneous results when the wallclock time gets
updated by another processor in the meantime, adding that clock
adjustment to the idle state's time counter.

If the clock adjustment was negative, the result is even worse due to an
erroneous cast from int to unsigned long long of the last_residency
variable. The negative 32 bit integer will zero-extend and result in a
forward time jump of roughly four billion milliseconds or 1.3 hours on
the idle state residency counter.

This patch changes all affected cpuidle drivers to use the monotonic
clock for their measurements instead. It also removes the erroneous
cast, making sure that negative residency values are applied correctly
even though they should not appear anymore.

Signed-off-by: Julius Werner <jwerner@chromium.org>
---
 arch/powerpc/platforms/pseries/processor_idle.c |    4 ++--
 drivers/acpi/processor_idle.c                   |   12 ++++++------
 drivers/cpuidle/cpuidle.c                       |    3 +--
 drivers/idle/intel_idle.c                       |   13 ++++---------
 4 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 45d00e5..4d806b4 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -36,7 +36,7 @@ static struct cpuidle_state *cpuidle_state_table;
 static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
 {
 
-	*kt_before = ktime_get_real();
+	*kt_before = ktime_get();
 	*in_purr = mfspr(SPRN_PURR);
 	/*
 	 * Indicate to the HV that we are idle. Now would be
@@ -50,7 +50,7 @@ static inline  s64 idle_loop_epilog(unsigned long in_purr, ktime_t kt_before)
 	get_lppaca()->wait_state_cycles += mfspr(SPRN_PURR) - in_purr;
 	get_lppaca()->idle = 0;
 
-	return ktime_to_us(ktime_sub(ktime_get_real(), kt_before));
+	return ktime_to_us(ktime_sub(ktime_get(), kt_before));
 }
 
 static int snooze_loop(struct cpuidle_device *dev,
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e8086c7..8c98d73 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -751,9 +751,9 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
 
 
 	lapic_timer_state_broadcast(pr, cx, 1);
-	kt1 = ktime_get_real();
+	kt1 = ktime_get();
 	acpi_idle_do_entry(cx);
-	kt2 = ktime_get_real();
+	kt2 = ktime_get();
 	idle_time =  ktime_to_us(ktime_sub(kt2, kt1));
 
 	/* Update device last_residency*/
@@ -843,11 +843,11 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
 	if (cx->type == ACPI_STATE_C3)
 		ACPI_FLUSH_CPU_CACHE();
 
-	kt1 = ktime_get_real();
+	kt1 = ktime_get();
 	/* Tell the scheduler that we are going deep-idle: */
 	sched_clock_idle_sleep_event();
 	acpi_idle_do_entry(cx);
-	kt2 = ktime_get_real();
+	kt2 = ktime_get();
 	idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
 	idle_time = idle_time_ns;
 	do_div(idle_time, NSEC_PER_USEC);
@@ -934,7 +934,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
 	 */
 	lapic_timer_state_broadcast(pr, cx, 1);
 
-	kt1 = ktime_get_real();
+	kt1 = ktime_get();
 	/*
 	 * disable bus master
 	 * bm_check implies we need ARB_DIS
@@ -965,7 +965,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
 		c3_cpu_count--;
 		raw_spin_unlock(&c3_lock);
 	}
-	kt2 = ktime_get_real();
+	kt2 = ktime_get();
 	idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
 	idle_time = idle_time_ns;
 	do_div(idle_time, NSEC_PER_USEC);
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 7f15b85..1536edd 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -109,8 +109,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
 		/* This can be moved to within driver enter routine
 		 * but that results in multiple copies of same code.
 		 */
-		dev->states_usage[entered_state].time +=
-				(unsigned long long)dev->last_residency;
+		dev->states_usage[entered_state].time += dev->last_residency;
 		dev->states_usage[entered_state].usage++;
 	} else {
 		dev->last_residency = 0;
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index b0f6b4c..6329a97 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -56,7 +56,7 @@
 #include <linux/kernel.h>
 #include <linux/cpuidle.h>
 #include <linux/clockchips.h>
-#include <linux/hrtimer.h>	/* ktime_get_real() */
+#include <linux/hrtimer.h>	/* ktime_get() */
 #include <trace/events/power.h>
 #include <linux/sched.h>
 #include <linux/notifier.h>
@@ -281,8 +281,7 @@ static int intel_idle(struct cpuidle_device *dev,
 	struct cpuidle_state_usage *state_usage = &dev->states_usage[index];
 	unsigned long eax = (unsigned long)cpuidle_get_statedata(state_usage);
 	unsigned int cstate;
-	ktime_t kt_before, kt_after;
-	s64 usec_delta;
+	ktime_t kt_before;
 	int cpu = smp_processor_id();
 
 	cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
@@ -297,7 +296,7 @@ static int intel_idle(struct cpuidle_device *dev,
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
 
-	kt_before = ktime_get_real();
+	kt_before = ktime_get();
 
 	stop_critical_timings();
 	if (!need_resched()) {
@@ -310,17 +309,13 @@ static int intel_idle(struct cpuidle_device *dev,
 
 	start_critical_timings();
 
-	kt_after = ktime_get_real();
-	usec_delta = ktime_to_us(ktime_sub(kt_after, kt_before));
+	dev->last_residency = ktime_to_us(ktime_sub(ktime_get(), kt_before));
 
 	local_irq_enable();
 
 	if (!(lapic_timer_reliable_states & (1 << (cstate))))
 		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
 
-	/* Update cpuidle counters */
-	dev->last_residency = (int)usec_delta;
-
 	return index;
 }
 
-- 
1.7.8.6

^ permalink raw reply related

* RE: [PATCH 1/1] arch Kconfig: remove references to IRQ_PER_CPU
From: Luck, Tony @ 2012-11-13 21:28 UTC (permalink / raw)
  To: James Hogan, linux-kernel@vger.kernel.org
  Cc: linux-arch@vger.kernel.org, linux-mips@linux-mips.org,
	linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-hexagon@vger.kernel.org,
	Helge Deller, James E.J. Bottomley, Yu, Fenghua, Richard Kuo,
	Paul Mundt, Mike Frysinger, Ralf Baechle,
	uclinux-dist-devel@blackfin.uclinux.org, Thomas Gleixner,
	linuxppc-dev@lists.ozlabs.org, Paul Mackerras
In-Reply-To: <1352807948-26920-1-git-send-email-james.hogan@imgtec.com>

> But IRQ_PER_CPU wasn't removed from any of the architecture Kconfig
> files where it was defined or selected. It's completely unused so remove
> the remaining references.

Acked-by: Tony Luck <tony.luck@intel.com>

[Hope someone picks up this whole patch ... otherwise I can take the ia64 h=
unk]

^ permalink raw reply

* [PATCH V2] wanrouter: Remove it and the drivers that depend on it
From: Joe Perches @ 2012-11-13 20:17 UTC (permalink / raw)
  To: David Miller
  Cc: linux-mips, linux-doc, jcmvbkbc, harryxiyou, paulus, linux,
	richard, linux-xtensa, rob, user-mode-linux-devel, jdike,
	xiyoulinuxkernelgroup, user-mode-linux-user, linux-arm-kernel,
	chris, isdn, netdev, linux-kernel, ralf, linux-kernel,
	linuxppc-dev
In-Reply-To: <20121113.144406.1610017702502358739.davem@davemloft.net>

Remove wanrouter as it's obsolete and has not been updated
by sangoma since 2.4.3 or so and it's not used anymore.

Remove obsolete cyclomx drivers.
Update files that include now deleted wanrouter bits.

Signed-off-by: Joe Perches <joe@perches.com>
---

On Tue, 2012-11-13 at 14:44 -0500, David Miller wrote:
> Remove wanrouter as it's obsolete and has not been updated
> > by sangoma since 2.4.3 or so and it's not used anymore.
> > 
> > Remove obsolete cyclomx drivers.
> > Update defconfig files that enable wanrouter.
> > Update files that include now deleted wanrouter bits.
> []
> I'm fine with this change, except the arch defconfig bits.
> 
> We've been leaving those alone, and letting the arch maintainers
> do the updates themselves periodically.
> 
> Please resubmit this with those parts removed.

That seems an odd workflow as it leaves dangling CONFIG_<foo>
options set, but I guess it doesn't hurt so here it is.

I just removed the modified arch/.../<foo>defconfig files.

 Documentation/ioctl/ioctl-number.txt |    1 -
 Documentation/magic-number.txt       |    1 -
 Documentation/zh_CN/magic-number.txt |    1 -
 drivers/isdn/i4l/isdn_x25iface.c     |    1 -
 drivers/isdn/i4l/isdn_x25iface.h     |    1 -
 drivers/net/wan/Kconfig              |   54 --
 drivers/net/wan/Makefile             |    5 -
 drivers/net/wan/cycx_drv.c           |  569 ------------
 drivers/net/wan/cycx_main.c          |  346 --------
 drivers/net/wan/cycx_x25.c           | 1602 ----------------------------------
 include/linux/cyclomx.h              |   77 --
 include/linux/cycx_drv.h             |   64 --
 include/linux/wanrouter.h            |  129 ---
 include/uapi/linux/Kbuild            |    1 -
 include/uapi/linux/wanrouter.h       |  452 ----------
 net/Kconfig                          |    1 -
 net/Makefile                         |    1 -
 net/socket.c                         |    1 -
 net/wanrouter/Kconfig                |   27 -
 net/wanrouter/Makefile               |    7 -
 net/wanrouter/patchlevel             |    1 -
 net/wanrouter/wanmain.c              |  782 -----------------
 net/wanrouter/wanproc.c              |  380 --------
 23 files changed, 0 insertions(+), 4504 deletions(-)
 delete mode 100644 drivers/net/wan/cycx_drv.c
 delete mode 100644 drivers/net/wan/cycx_main.c
 delete mode 100644 drivers/net/wan/cycx_x25.c
 delete mode 100644 include/linux/cyclomx.h
 delete mode 100644 include/linux/cycx_drv.h
 delete mode 100644 include/linux/wanrouter.h
 delete mode 100644 include/uapi/linux/wanrouter.h
 delete mode 100644 net/wanrouter/Kconfig
 delete mode 100644 net/wanrouter/Makefile
 delete mode 100644 net/wanrouter/patchlevel
 delete mode 100644 net/wanrouter/wanmain.c
 delete mode 100644 net/wanrouter/wanproc.c

diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 2152b0e..028a034 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -179,7 +179,6 @@ Code  Seq#(hex)	Include File		Comments
 'V'	C0	media/davinci/vpfe_capture.h	conflict!
 'V'	C0	media/si4713.h		conflict!
 'W'	00-1F	linux/watchdog.h	conflict!
-'W'	00-1F	linux/wanrouter.h	conflict!
 'W'	00-3F	sound/asound.h		conflict!
 'X'	all	fs/xfs/xfs_fs.h		conflict!
 		and fs/xfs/linux-2.6/xfs_ioctl32.h
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 82761a3..0c39e72 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC          0x4f17a36d  kmem_cache        mm/slab.c
 COW_MAGIC             0x4f4f4f4d  cow_header_v1     arch/um/drivers/ubd_user.c
 I810_CARD_MAGIC       0x5072696E  i810_card         sound/oss/i810_audio.c
 TRIDENT_CARD_MAGIC    0x5072696E  trident_card      sound/oss/trident.c
-ROUTER_MAGIC          0x524d4157  wan_device        include/linux/wanrouter.h
 SCC_MAGIC             0x52696368  gs_port           drivers/char/scc.h
 SAVEKMSG_MAGIC1       0x53415645  savekmsg          arch/*/amiga/config.c
 GDA_MAGIC             0x58464552  gda               arch/mips/include/asm/sn/gda.h
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index 4263022..51b7e15 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC          0x4f17a36d  kmem_cache        mm/slab.c
 COW_MAGIC             0x4f4f4f4d  cow_header_v1     arch/um/drivers/ubd_user.c
 I810_CARD_MAGIC       0x5072696E  i810_card         sound/oss/i810_audio.c
 TRIDENT_CARD_MAGIC    0x5072696E  trident_card      sound/oss/trident.c
-ROUTER_MAGIC          0x524d4157  wan_device        include/linux/wanrouter.h
 SCC_MAGIC             0x52696368  gs_port           drivers/char/scc.h
 SAVEKMSG_MAGIC1       0x53415645  savekmsg          arch/*/amiga/config.c
 GDA_MAGIC             0x58464552  gda               arch/mips/include/asm/sn/gda.h
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
index e2d4e58..d00c86d 100644
--- a/drivers/isdn/i4l/isdn_x25iface.c
+++ b/drivers/isdn/i4l/isdn_x25iface.c
@@ -21,7 +21,6 @@
 #include <linux/netdevice.h>
 #include <linux/concap.h>
 #include <linux/slab.h>
-#include <linux/wanrouter.h>
 #include <net/x25device.h>
 #include "isdn_x25iface.h"
 
diff --git a/drivers/isdn/i4l/isdn_x25iface.h b/drivers/isdn/i4l/isdn_x25iface.h
index 0b26e3b..ca08e08 100644
--- a/drivers/isdn/i4l/isdn_x25iface.h
+++ b/drivers/isdn/i4l/isdn_x25iface.h
@@ -19,7 +19,6 @@
 #endif
 
 #include <linux/skbuff.h>
-#include <linux/wanrouter.h>
 #include <linux/isdn.h>
 #include <linux/concap.h>
 
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index d58431e..0c077b0 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -356,60 +356,6 @@ config SDLA
 	  To compile this driver as a module, choose M here: the
 	  module will be called sdla.
 
-# Wan router core.
-config WAN_ROUTER_DRIVERS
-	tristate "WAN router drivers"
-	depends on WAN_ROUTER
-	---help---
-	  Connect LAN to WAN via Linux box.
-
-	  Select driver your card and remember to say Y to "Wan Router."
-	  You will need the wan-tools package which is available from
-	  <ftp://ftp.sangoma.com/>.
-
-	  Note that the answer to this question won't directly affect the
-	  kernel except for how subordinate drivers may be built:
-	  saying N will just cause the configurator to skip all
-	  the questions about WAN router drivers.
-
-	  If unsure, say N.
-
-config CYCLADES_SYNC
-	tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
-	depends on WAN_ROUTER_DRIVERS && (PCI || ISA)
-	---help---
-	  Cyclom 2X from Cyclades Corporation <http://www.avocent.com/> is an
-	  intelligent multiprotocol WAN adapter with data transfer rates up to
-	  512 Kbps. These cards support the X.25 and SNA related protocols.
-
-	  While no documentation is available at this time please grab the
-	  wanconfig tarball in
-	  <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
-	  to make it compile with the current wanrouter include files; efforts
-	  are being made to use the original package available at
-	  <ftp://ftp.sangoma.com/>).
-
-	  Feel free to contact me or the cycsyn-devel mailing list at
-	  <acme@conectiva.com.br> and <cycsyn-devel@bazar.conectiva.com.br> for
-	  additional details, I hope to have documentation available as soon as
-	  possible. (Cyclades Brazil is writing the Documentation).
-
-	  The next questions will ask you about the protocols you want the
-	  driver to support (for now only X.25 is supported).
-
-	  If you have one or more of these cards, say Y to this option.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called cyclomx.
-
-config CYCLOMX_X25
-	bool "Cyclom 2X X.25 support (EXPERIMENTAL)"
-	depends on CYCLADES_SYNC
-	help
-	  Connect a Cyclom 2X card to an X.25 network.
-
-	  Enabling X.25 support will enlarge your kernel by about 11 kB.
-
 # X.25 network drivers
 config LAPBETHER
 	tristate "LAPB over Ethernet driver (EXPERIMENTAL)"
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index df70248..c135ef4 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -5,10 +5,6 @@
 # Rewritten to use lists instead of if-statements.
 #
 
-cyclomx-y                       := cycx_main.o
-cyclomx-$(CONFIG_CYCLOMX_X25)	+= cycx_x25.o
-cyclomx-objs			:= $(cyclomx-y)  
-
 obj-$(CONFIG_HDLC)		+= hdlc.o
 obj-$(CONFIG_HDLC_RAW)		+= hdlc_raw.o
 obj-$(CONFIG_HDLC_RAW_ETH)	+= hdlc_raw_eth.o
@@ -28,7 +24,6 @@ obj-$(CONFIG_LANMEDIA)		+= lmc/
 
 obj-$(CONFIG_DLCI)		+= dlci.o 
 obj-$(CONFIG_SDLA)		+= sdla.o
-obj-$(CONFIG_CYCLADES_SYNC)	+= cycx_drv.o cyclomx.o
 obj-$(CONFIG_LAPBETHER)		+= lapbether.o
 obj-$(CONFIG_SBNI)		+= sbni.o
 obj-$(CONFIG_N2)		+= n2.o
diff --git a/drivers/net/wan/cycx_drv.c b/drivers/net/wan/cycx_drv.c
deleted file mode 100644
index 2a3ecae..0000000
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
deleted file mode 100644
index 81fbbad..0000000
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
deleted file mode 100644
index 06f3f63..0000000
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
deleted file mode 100644
index b88f7f4..0000000
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
deleted file mode 100644
index 12fe6b0..0000000
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
deleted file mode 100644
index cec4b41..0000000
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index e194387..c54b7e7 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -408,7 +408,6 @@ header-y += virtio_ring.h
 header-y += virtio_rng.h
 header-y += vt.h
 header-y += wait.h
-header-y += wanrouter.h
 header-y += watchdog.h
 header-y += wimax.h
 header-y += wireless.h
diff --git a/include/uapi/linux/wanrouter.h b/include/uapi/linux/wanrouter.h
deleted file mode 100644
index 7617df2..0000000
diff --git a/net/Kconfig b/net/Kconfig
index 30b48f5..4cf4bb5 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -209,7 +209,6 @@ source "net/ipx/Kconfig"
 source "drivers/net/appletalk/Kconfig"
 source "net/x25/Kconfig"
 source "net/lapb/Kconfig"
-source "net/wanrouter/Kconfig"
 source "net/phonet/Kconfig"
 source "net/ieee802154/Kconfig"
 source "net/mac802154/Kconfig"
diff --git a/net/Makefile b/net/Makefile
index 4f4ee08..c5aa8b3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_BRIDGE)		+= bridge/
 obj-$(CONFIG_NET_DSA)		+= dsa/
 obj-$(CONFIG_IPX)		+= ipx/
 obj-$(CONFIG_ATALK)		+= appletalk/
-obj-$(CONFIG_WAN_ROUTER)	+= wanrouter/
 obj-$(CONFIG_X25)		+= x25/
 obj-$(CONFIG_LAPB)		+= lapb/
 obj-$(CONFIG_NETROM)		+= netrom/
diff --git a/net/socket.c b/net/socket.c
index 2ca51c7..5c4d82c 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -69,7 +69,6 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/mutex.h>
-#include <linux/wanrouter.h>
 #include <linux/if_bridge.h>
 #include <linux/if_frad.h>
 #include <linux/if_vlan.h>
diff --git a/net/wanrouter/Kconfig b/net/wanrouter/Kconfig
deleted file mode 100644
index a157a2e..0000000
diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile
deleted file mode 100644
index 4da14bc..0000000
diff --git a/net/wanrouter/patchlevel b/net/wanrouter/patchlevel
deleted file mode 100644
index c043eea..0000000
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
deleted file mode 100644
index 2ab7850..0000000
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c
deleted file mode 100644
index c43612e..0000000
-- 
1.7.8.112.g3fd21

^ permalink raw reply related

* Re: [PATCH] wanrouter: Remove it and the drivers that depend on it
From: David Miller @ 2012-11-13 19:44 UTC (permalink / raw)
  To: joe
  Cc: linux-mips, linux-doc, jcmvbkbc, harryxiyou, paulus, linux,
	richard, linux-xtensa, rob, user-mode-linux-devel, jdike,
	xiyoulinuxkernelgroup, user-mode-linux-user, linux-arm-kernel,
	chris, isdn, netdev, linux-kernel, ralf, linux-kernel,
	linuxppc-dev
In-Reply-To: <67fe0c5701a8c7cfe06b178cf04b1c5c06592714.1352548454.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Sat, 10 Nov 2012 06:20:55 -0800

> Remove wanrouter as it's obsolete and has not been updated
> by sangoma since 2.4.3 or so and it's not used anymore.
> 
> Remove obsolete cyclomx drivers.
> Update defconfig files that enable wanrouter.
> Update files that include now deleted wanrouter bits.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

I'm fine with this change, except the arch defconfig bits.

We've been leaving those alone, and letting the arch maintainers
do the updates themselves periodically.

Please resubmit this with those parts removed.

Thanks.

^ permalink raw reply

* [PATCH] bindings: i2c: use consistent naming for i2c binding descriptions
From: Wolfram Sang @ 2012-11-13 17:16 UTC (permalink / raw)
  To: linux-i2c
  Cc: devicetree-discuss, Wolfram Sang, linux-kernel, linuxppc-dev,
	Rob Herring, linux-arm-kernel

Filenames of devictree binding documentation seems to be arbitrary and
for me it is unneeded hazzle to find the corresponding documentation for
a specific driver.

Naming the description the same as the driver is a lot easier and makes
sense to me since the driver defines the binding it understands.

Also, remove a reference in one source to the binding documentation, since path
information easily gets stale.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
---

I think it would be helpful if other subsystems would follow if we can agree on
this pattern.

Thanks,

   Wolfram

 .../bindings/i2c/{atmel-i2c.txt => i2c-at91.txt}     |    0
 .../bindings/i2c/{davinci.txt => i2c-davinci.txt}    |    0
 .../bindings/i2c/{gpio-i2c.txt => i2c-gpio.txt}      |    0
 .../bindings/i2c/{fsl-imx-i2c.txt => i2c-imx.txt}    |    0
 .../bindings/i2c/{fsl-i2c.txt => i2c-mpc.txt}        |    0
 .../devicetree/bindings/i2c/{mux.txt => i2c-mux.txt} |    0
 .../devicetree/bindings/i2c/i2c-mv64xxx.txt          |   18 ++++++++++++++++++
 .../bindings/i2c/{nomadik.txt => i2c-nomadik.txt}    |    0
 .../bindings/i2c/{cavium-i2c.txt => i2c-octeon.txt}  |    0
 .../bindings/i2c/{omap-i2c.txt => i2c-omap.txt}      |    0
 .../devicetree/bindings/i2c/{pnx.txt => i2c-pnx.txt} |    0
 .../i2c/{ce4100-i2c.txt => i2c-pxa-pci-ce4100.txt}   |    0
 .../bindings/i2c/{mrvl-i2c.txt => i2c-pxa.txt}       |   18 ------------------
 .../i2c/{samsung-i2c.txt => i2c-s3c2410.txt}         |    0
 .../bindings/i2c/{sirf-i2c.txt => i2c-sirf.txt}      |    0
 .../i2c/{arm-versatile.txt => i2c-versatile.txt}     |    0
 .../bindings/i2c/{xiic.txt => i2c-xiic.txt}          |    0
 drivers/i2c/busses/i2c-ocores.c                      |    4 ----
 18 files changed, 18 insertions(+), 22 deletions(-)
 rename Documentation/devicetree/bindings/i2c/{atmel-i2c.txt => i2c-at91.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{davinci.txt => i2c-davinci.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{gpio-i2c.txt => i2c-gpio.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{fsl-imx-i2c.txt => i2c-imx.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{fsl-i2c.txt => i2c-mpc.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{mux.txt => i2c-mux.txt} (100%)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
 rename Documentation/devicetree/bindings/i2c/{nomadik.txt => i2c-nomadik.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{cavium-i2c.txt => i2c-octeon.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{omap-i2c.txt => i2c-omap.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{pnx.txt => i2c-pnx.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{ce4100-i2c.txt => i2c-pxa-pci-ce4100.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{mrvl-i2c.txt => i2c-pxa.txt} (70%)
 rename Documentation/devicetree/bindings/i2c/{samsung-i2c.txt => i2c-s3c2410.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{sirf-i2c.txt => i2c-sirf.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{arm-versatile.txt => i2c-versatile.txt} (100%)
 rename Documentation/devicetree/bindings/i2c/{xiic.txt => i2c-xiic.txt} (100%)

diff --git a/Documentation/devicetree/bindings/i2c/atmel-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/atmel-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-at91.txt
diff --git a/Documentation/devicetree/bindings/i2c/davinci.txt b/Documentation/devicetree/bindings/i2c/i2c-davinci.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/davinci.txt
rename to Documentation/devicetree/bindings/i2c/i2c-davinci.txt
diff --git a/Documentation/devicetree/bindings/i2c/gpio-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/gpio-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-gpio.txt
diff --git a/Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/fsl-imx-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-imx.txt
diff --git a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-mpc.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/fsl-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-mpc.txt
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/i2c-mux.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/mux.txt
rename to Documentation/devicetree/bindings/i2c/i2c-mux.txt
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
new file mode 100644
index 0000000..f46d928
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -0,0 +1,18 @@
+
+* Marvell MV64XXX I2C controller
+
+Required properties :
+
+ - reg             : Offset and length of the register set for the device
+ - compatible      : Should be "marvell,mv64xxx-i2c"
+ - interrupts      : The interrupt number
+ - clock-frequency : Desired I2C bus clock frequency in Hz.
+
+Examples:
+
+	i2c@11000 {
+		compatible = "marvell,mv64xxx-i2c";
+		reg = <0x11000 0x20>;
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};
diff --git a/Documentation/devicetree/bindings/i2c/nomadik.txt b/Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/nomadik.txt
rename to Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
diff --git a/Documentation/devicetree/bindings/i2c/cavium-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-octeon.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/cavium-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-octeon.txt
diff --git a/Documentation/devicetree/bindings/i2c/omap-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-omap.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/omap-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-omap.txt
diff --git a/Documentation/devicetree/bindings/i2c/pnx.txt b/Documentation/devicetree/bindings/i2c/i2c-pnx.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/pnx.txt
rename to Documentation/devicetree/bindings/i2c/i2c-pnx.txt
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-pxa-pci-ce4100.txt
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
similarity index 70%
rename from Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-pxa.txt
index 0f79450..12b78ac 100644
--- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
@@ -31,21 +31,3 @@ Examples:
 		reg = <0xd4025000 0x1000>;
 		interrupts = <58>;
 	};
-
-* Marvell MV64XXX I2C controller
-
-Required properties :
-
- - reg             : Offset and length of the register set for the device
- - compatible      : Should be "marvell,mv64xxx-i2c"
- - interrupts      : The interrupt number
- - clock-frequency : Desired I2C bus clock frequency in Hz.
-
-Examples:
-
-	i2c@11000 {
-		compatible = "marvell,mv64xxx-i2c";
-		reg = <0x11000 0x20>;
-		interrupts = <29>;
-		clock-frequency = <100000>;
-	};
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/samsung-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt
diff --git a/Documentation/devicetree/bindings/i2c/sirf-i2c.txt b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/sirf-i2c.txt
rename to Documentation/devicetree/bindings/i2c/i2c-sirf.txt
diff --git a/Documentation/devicetree/bindings/i2c/arm-versatile.txt b/Documentation/devicetree/bindings/i2c/i2c-versatile.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/arm-versatile.txt
rename to Documentation/devicetree/bindings/i2c/i2c-versatile.txt
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/i2c-xiic.txt
similarity index 100%
rename from Documentation/devicetree/bindings/i2c/xiic.txt
rename to Documentation/devicetree/bindings/i2c/i2c-xiic.txt
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index bffd550..15da1ac 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -9,10 +9,6 @@
  * kind, whether express or implied.
  */
 
-/*
- * This driver can be used from the device tree, see
- *     Documentation/devicetree/bindings/i2c/ocore-i2c.txt
- */
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 1/1] arch Kconfig: remove references to IRQ_PER_CPU
From: James Hogan @ 2012-11-13 11:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, linux-mips, James Hogan, linux-ia64, linux-parisc,
	linux-sh, linux-hexagon, Helge Deller, Paul Mundt,
	James E.J. Bottomley, Fenghua Yu, Richard Kuo, Tony Luck,
	Mike Frysinger, Ralf Baechle, uclinux-dist-devel, Thomas Gleixner,
	linuxppc-dev, Paul Mackerras

The IRQ_PER_CPU Kconfig symbol was removed in the following commit:

Commit 6a58fb3bad099076f36f0f30f44507bc3275cdb6 ("genirq: Remove
CONFIG_IRQ_PER_CPU") merged in v2.6.39-rc1.

But IRQ_PER_CPU wasn't removed from any of the architecture Kconfig
files where it was defined or selected. It's completely unused so remove
the remaining references.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
---
Based on v3.7-rc5.

Compile tested defconfigs for bfin, ia64, mips, parisc, powerpc, sh, but
not hexagon.

Grepped entire tree to check no references to CONFIG_IRQ_PER_CPU, and
grepped arch/ for Kconfig files referencing IRQ_PER_CPU.

 arch/blackfin/Kconfig |    1 -
 arch/hexagon/Kconfig  |    1 -
 arch/ia64/Kconfig     |    1 -
 arch/mips/Kconfig     |    1 -
 arch/parisc/Kconfig   |    1 -
 arch/powerpc/Kconfig  |    1 -
 arch/sh/Kconfig       |    3 ---
 7 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b6f3ad5..c709715 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -38,7 +38,6 @@ config BLACKFIN
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_ATOMIC64
 	select GENERIC_IRQ_PROBE
-	select IRQ_PER_CPU if SMP
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 	select GENERIC_SMP_IDLE_THREAD
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 0744f7d..800dd9c 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -12,7 +12,6 @@ config HEXAGON
 	# select ARCH_WANT_OPTIONAL_GPIOLIB
 	# select ARCH_REQUIRE_GPIOLIB
 	# select HAVE_CLK
-	# select IRQ_PER_CPU
 	# select GENERIC_PENDING_IRQ if SMP
 	select HAVE_IRQ_WORK
 	select GENERIC_ATOMIC64
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 3279646..00c2e88 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -29,7 +29,6 @@ config IA64
 	select ARCH_DISCARD_MEMBLOCK
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PENDING_IRQ if SMP
-	select IRQ_PER_CPU
 	select GENERIC_IRQ_SHOW
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index dba9390..d47de79 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2197,7 +2197,6 @@ source "mm/Kconfig"
 config SMP
 	bool "Multi-Processing support"
 	depends on SYS_SUPPORTS_SMP
-	select IRQ_PER_CPU
 	select USE_GENERIC_SMP_HELPERS
 	help
 	  This enables support for systems with more than one CPU. If you have
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 11def45..6d37987 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -16,7 +16,6 @@ config PARISC
 	select BROKEN_RODATA
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PCI_IOMAP
-	select IRQ_PER_CPU
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_STRNCPY_FROM_USER
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a902a5c..721dd7b 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -125,7 +125,6 @@ config PPC
 	select HAVE_GENERIC_HARDIRQS
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select SPARSE_IRQ
-	select IRQ_PER_CPU
 	select IRQ_DOMAIN
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IRQ_SHOW_LEVEL
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index babc2b8..6f799ec 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -91,9 +91,6 @@ config GENERIC_CSUM
 config GENERIC_HWEIGHT
 	def_bool y
 
-config IRQ_PER_CPU
-	def_bool y
-
 config GENERIC_GPIO
 	def_bool n
 
-- 
1.7.7.6

^ permalink raw reply related

* Re: Build regressions/improvements in v3.7-rc5
From: Geert Uytterhoeven @ 2012-11-13 10:39 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1352757066.32153.5@snotra>

Hi Scott,

On Mon, Nov 12, 2012 at 10:51 PM, Scott Wood <scottwood@freescale.com> wrote:
> On 11/12/2012 03:02:46 PM, Geert Uytterhoeven wrote:
>> On Mon, Nov 12, 2012 at 9:58 PM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>> > JFYI, when comparing v3.7-rc5 to v3.7-rc4[3], the summaries are:
>> >   - build errors: +14/-4
>>
>> 14 regressions:
>>   + drivers/virt/fsl_hypervisor.c: error: 'MSR_GS' undeclared (first
>> use in this function):  => 799:93
>
> These reports would be more useful if the actual .config were provided,
> rather than just saying "powerpc randconfig".

This can be obtained from the kissb build system.
[1] http://kisskb.ellerman.id.au/kisskb/head/5614/ (all 117 configs)

> I doubt this particular one is a regression; it looks like the dependencies

Yeah, regressions in randconfigs can be misleading.
Still, they're build failures.

> have always been too weak (patch sent) and you're just comparing different
> randomly-generated configs.

Thanks for your patch!

>> powerpc-randconfig
>>
>>   + error: relocation truncated to fit: R_PPC64_REL24 against symbol
>> `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o:
>> (.text+0x1ff9eb8) => (.text+0x1ffa274), (.text+0x1ff7840)
>>
>> powerpc-allyesconfig
>
>
> It's been over 3 years since powerpc-allyesconfig built (it's just too big
> for the relocation model the kernel uses) -- how is this a regression?

It's a regression because it didn't complain about ".mcount" in the
previous run.

But I'll start stripping them from the rc-incremental reports.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply

* Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
From: Geert Uytterhoeven @ 2012-11-13 10:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-arch, linux-sh, linux-kernel, David S. Miller, sparclinux,
	Paul Mundt, Paul Mackerras, Bjorn Helgaas, Andrew Morton,
	linuxppc-dev, H Hartley Sweeten
In-Reply-To: <20121113082615.2f482eb8835daf46e1f27947@canb.auug.org.au>

On Mon, Nov 12, 2012 at 10:26 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 366ec06..9bc00e7 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -271,6 +271,13 @@ config ARCH_WANT_OLD_COMPAT_IPC
>         select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
>         bool
>
> +config ARCH_NO_VIRT_TO_BUS
> +       bool
> +       help
> +         An architecture should select this if it cannot (or will not)
> +         implement virt_to_bus().  All new architectures should probably
> +         select this.

Don't we typically put the burden of selecting Kconfig flags for deprecated
features on the existing architectures that provide the deprecated features?

I.e. shouldn't it be ARCH_HAS_VIRT_TO_BUS, selected by the architectures
that need it, instead?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply

* Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
From: James Hogan @ 2012-11-13  9:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-arch, linux-sh, linux-kernel, David S. Miller, sparclinux,
	Paul Mundt, Paul Mackerras, Bjorn Helgaas, Andrew Morton,
	linuxppc-dev, H Hartley Sweeten
In-Reply-To: <20121113082615.2f482eb8835daf46e1f27947@canb.auug.org.au>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/11/12 21:26, Stephen Rothwell wrote:
> Make if easier for more architectures to select it and thus
> disable drivers that use virt_to_bus().
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Reviewed-by: James Hogan <james.hogan@imgtec.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJQohD8AAoJEKHZs+irPybf82gP/Az9f+Q5Vn/fGkQwOOpfsxsl
hpZGzIc7P6/ZU6IFWxN8hAKdJjOBH/ko0r+LMoczlQzlhlFd+qpDU+i2tZBqbp/G
S+4w56J/PC5MtZFlUEh68e0H313Mgt9kK8vy4yVnzBTvIgGsJuXjeK4qQSKBm3LP
LguU2AONT8GCfT8DRm9sbdS+WcXnBjRWeUkm8pZ+UX8kEe7ryaccidwvR16aP9l1
zx4HwFW0nCLYxwSOVQg2hi2pQyHD5sqFeLEYNbvEPlGleRKNJtz3bnYWbRdPkO2D
CoRjiSw5/iCd/SghvwEKdkJFkOw4zdONElrBvsYXqn3QsFFpyYal43gyKIgPkSb6
s5OdTJ1ScS3IgtxFpQ1nfj020rS1ieM8eY/bXyuGPEZzwbe0moe+g64Qye9nEutn
7oWKoue1H8uRaJ46WoD22bjG7SezLycDnAlG6ujo75qyxeBcVJ9ZB6DxHPnEU02M
P0sA8FLTFmzigRV2TBKBZbh3NrFGEi/riMA8U9f9XfLkxt7zdXGTvJ45C91U8HjT
3uQffRL/WBOQOILXtEFzf22DSPeoRklvyZmlHBsmNC6AYhSDnOvpUfOThaetQaFe
voiFdDZhtxdk20l0DpReeAUBVUFOjBjh6NzWLZbVdrfgHrpndw7s7jjfy/e5vhDU
wI2jW7slxuwARtv3Q1CV
=XvmD
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: hoo boy, interrupt Handling on BGQ
From: Benjamin Herrenschmidt @ 2012-11-12 22:19 UTC (permalink / raw)
  To: Jimi Xenidis; +Cc: Kumar Gala, linuxppc-dev
In-Reply-To: <9FB7F97D-D988-495B-93C8-746963DFF15C@pobox.com>

On Mon, 2012-11-12 at 15:33 -0600, Jimi Xenidis wrote:
> So interrupts need to go to FW before Linux, please let not talk about how silly that is.
> Lets talk about something far more silly...
> In order to get to the Linux exception handlers, we have to tell FW where the interrupt page is, and then it _copies_ it.
> 
> IFAICT, this means that each vectors on the "copied" page must:
> 1) construct an 64-bit absolute address to a per vector stub
> 2) leap at the (with bctr or blr)
> 3) restore CTR or LR and anything else that (1) messed up
> 4) normal branch to the actual vector
> 
> This is what I'll be working on, but I'd love to hear any other ideas.

Replace the firmware with something sane ?

Cheers,
Ben.

^ permalink raw reply

* Re: Build regressions/improvements in v3.7-rc5
From: Stephen Rothwell @ 2012-11-12 22:05 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Scott Wood, linuxppc-dev, linux-kernel
In-Reply-To: <CAMuHMdXE0yJNivpirGgx08zqLH2086ydeOU6zswXj-+zn8OsWQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Hi Geert,

Thanks for these reports!

On Mon, 12 Nov 2012 22:02:46 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
>   + error: relocation truncated to fit: R_PPC64_REL24 against symbol
> `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o:
> (.text+0x1ff9eb8) => (.text+0x1ffa274), (.text+0x1ff7840)
> 
> powerpc-allyesconfig

Yeah, as Scott said, these are not worth reporting.  However, they are
being worked on in various ways, but will probably not be solved very
soon (it means we have to change how we link the kernel and that will
probably require some discussion).

I just keep the powerpc allyesconfig build there to catch other stuff
(like drivers that assume too much).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] drivers/virt: fix dependency on FSL booke hv management driver
From: Timur Tabi @ 2012-11-12 22:01 UTC (permalink / raw)
  To: Scott Wood; +Cc: Geert Uytterhoeven, linuxppc-dev
In-Reply-To: <1352757003-3070-1-git-send-email-scottwood@freescale.com>

Scott Wood wrote:
> If built on non-booke, the build will fail looking for MSR_GS as reported here:
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-November/101944.html
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Timur Tabi <timur@freescale.com>
> ---
> Timur, I thought we were going to get rid of that MSR_GS check...

I posted a fix back in May, and I sent Kumar a few reminders over the past
six months.  You'll have to ask him why he never applied it.

http://marc.info/?l=linux-kernel&m=133728200626957&w=4

> 
>  drivers/virt/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/virt/Kconfig b/drivers/virt/Kconfig
> index 2dcdbc9..db5b9e6 100644
> --- a/drivers/virt/Kconfig
> +++ b/drivers/virt/Kconfig
> @@ -14,7 +14,7 @@ if VIRT_DRIVERS
>  
>  config FSL_HV_MANAGER
>  	tristate "Freescale hypervisor management driver"
> -	depends on FSL_SOC
> +	depends on FSL_SOC_BOOKE
>  	help
>            The Freescale hypervisor management driver provides several services
>  	  to drivers and applications related to the Freescale hypervisor:
> 


-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* Re: Build regressions/improvements in v3.7-rc5
From: Scott Wood @ 2012-11-12 21:51 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <CAMuHMdXE0yJNivpirGgx08zqLH2086ydeOU6zswXj-+zn8OsWQ@mail.gmail.com>

On 11/12/2012 03:02:46 PM, Geert Uytterhoeven wrote:
> On Mon, Nov 12, 2012 at 9:58 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > JFYI, when comparing v3.7-rc5 to v3.7-rc4[3], the summaries are:
> >   - build errors: +14/-4
>=20
> 14 regressions:
>   + drivers/virt/fsl_hypervisor.c: error: 'MSR_GS' undeclared (first
> use in this function):  =3D> 799:93

These reports would be more useful if the actual .config were provided, =20
rather than just saying "powerpc randconfig".

I doubt this particular one is a regression; it looks like the =20
dependencies have always been too weak (patch sent) and you're just =20
comparing different randomly-generated configs.

> powerpc-randconfig
>=20
>   + error: relocation truncated to fit: R_PPC64_REL24 against symbol
> `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o:
> (.text+0x1ff9eb8) =3D> (.text+0x1ffa274), (.text+0x1ff7840)
>=20
> powerpc-allyesconfig

It's been over 3 years since powerpc-allyesconfig built (it's just too =20
big for the relocation model the kernel uses) -- how is this a =20
regression?

-Scott=

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox