* RE: [PATCH 06/20] powerpc/xmon: Remove renaming #defines of scanhex() and skipbl()
From: David Laight @ 2012-10-09 14:59 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: Paul Mackerras, Anton Blanchard
In-Reply-To: <1349792447-15714-6-git-send-email-michael@ellerman.id.au>
> We have two #defines that rename scanhex() and skipbl() to
> xmon_scanhex() and xmon_skipbl() - but no one ever uses those
> names.
It looks like they are there for namespace protection.
David
^ permalink raw reply
* Re: gianfar driver crash on P1020
From: Claudiu Manoil @ 2012-10-09 16:37 UTC (permalink / raw)
To: Avi Tsarfati; +Cc: linuxppc-dev
In-Reply-To: <56439212F1FB0D45B3354883689F4245559383@yoqex01.alvarion.com>
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
Hello,
Did you try this patch?
http://patchwork.ozlabs.org/patch/186315/
Claudiu
On 10/9/2012 3:22 PM, Avi Tsarfati wrote:
>
> Hi,
>
> I have the same problem as you do.
>
> Have you found the CPU stuck reason (or fix) in P1020RDB board ?
>
> Thanks,
>
> Avi Tsarfati.
>
>
>
> ************************************************************************************
>
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &
> computer viruses(187).
> ************************************************************************************
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
[-- Attachment #2: Type: text/html, Size: 3455 bytes --]
^ permalink raw reply
* RE: gianfar driver crash on P1020
From: Avi Tsarfati @ 2012-10-09 17:43 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: linuxppc-dev
In-Reply-To: <507452B0.7040401@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 2172 bytes --]
Thank you very much for your quick response and willing to share.
I'll test it and let you know.
From: Claudiu Manoil [mailto:claudiu.manoil@freescale.com]
Sent: Tuesday, October 09, 2012 6:37 PM
To: Avi Tsarfati
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: gianfar driver crash on P1020
Hello,
Did you try this patch?
http://patchwork.ozlabs.org/patch/186315/
Claudiu
On 10/9/2012 3:22 PM, Avi Tsarfati wrote:
Hi,
I have the same problem as you do.
Have you found the CPU stuck reason (or fix) in P1020RDB board ?
Thanks,
Avi Tsarfati.
************************************************************************
************
This footnote confirms that this email message has been scanned
by
PineApp Mail-SeCure for the presence of malicious code, vandals
& computer viruses(187).
************************************************************************
************
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses(100).
************************************************************************
************
************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses(42).
************************************************************************
************
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses(187).
************************************************************************************
[-- Attachment #2: Type: text/html, Size: 6386 bytes --]
^ permalink raw reply
* Re: 答复: [RFC PATCH] powerpc/fsl: add timer wakeup source
From: Scott Wood @ 2012-10-09 18:18 UTC (permalink / raw)
To: Wang Dongsheng-B40534
Cc: Wood Scott-B07421, Li Yang-R58472, linux-pm@vger.kernel.org,
Wang Dongsheng, linuxppc-dev@lists.ozlabs.org list
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F15439259DF3F7F@039-SN2MPN1-021.039d.mgd.msft.net>
On 10/09/2012 08:56:53 AM, Wang Dongsheng-B40534 wrote:
>=20
> > > > > I'm pretty sure /proc/ is NOT where we want this exposed.
> > > >
> > > > Should probably go under the sysfs directory of the mpic =20
> device. Or
> > > > better, make a generic interface for timer-based suspend wakeup =20
> (if
> > > there
> > > > isn't one already). This current approach sits in an unpleasant
> > middle
> > > > ground between generic and device-specific.
> > > >
> > > /sys/power/wakeup_timer_seconds how about this?
> > > I think it is a freescale generic interface, this interface =20
> control by
> > > FSL_SOC && SUSPEND.
>=20
> > There's no such thing as a "Freescale generic interface". Linux =20
> APIs
> > are not organized by hardware vendor. Either make a truly generic
> > interface, reuse an existing one, or do something that is attached =20
> to
> > the specific driver.
> Thanks, I think i can change mpic timer registration, i will use =20
> platform_driver_register.
> I will merge "mpic timer" and "timer wakeup". In "mpic timer" the =20
> wakeup function
> controls by SUSPEND. The sys path is =20
> "/sys/devices/soc8572.4/ffe41100.timer/wakeup_seconds".
> do you have any suggestions for this? or have a better idea about the =20
> sys path?
I'm not sure what you mean by the merging, but the path looks OK (I'd =20
prefer a dash rather than underscore, but I'm not sure what the usual =20
practice is in sysfs).
That said, this seems like something that could use a truly generic =20
interface.
-Scott=
^ permalink raw reply
* [PATCH 3/3] rapidio: update for destination ID allocation
From: Alexandre Bounine @ 2012-10-09 19:57 UTC (permalink / raw)
To: Andrew Morton, linux-kernel, linuxppc-dev; +Cc: Alexandre Bounine
In-Reply-To: <1349812676-27057-1-git-send-email-alexandre.bounine@idt.com>
This patch address comments provided by Andrew Morton:
https://lkml.org/lkml/2012/10/3/550
- Keeps consistent kerneldoc compatible comments style for new static functions.
- Removes unnecessary complexity from destination ID allocation routine.
- Uses kcalloc() for code clarity.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
---
drivers/rapidio/rio-scan.c | 38 ++++++++++++++++----------------------
include/linux/rio.h | 1 -
2 files changed, 16 insertions(+), 23 deletions(-)
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 05f0ed9..07da58b 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -55,9 +55,9 @@ static int rio_mport_phys_table[] = {
};
-/*
+/**
* rio_destid_alloc - Allocate next available destID for given network
- * net: RIO network
+ * @net: RIO network
*
* Returns next available device destination ID for the specified RIO network.
* Marks allocated ID as one in use.
@@ -69,14 +69,9 @@ static u16 rio_destid_alloc(struct rio_net *net)
struct rio_id_table *idtab = &net->destid_table;
spin_lock(&idtab->lock);
- destid = find_next_zero_bit(idtab->table, idtab->max, idtab->next);
- if (destid >= idtab->max)
- destid = find_first_zero_bit(idtab->table, idtab->max);
+ destid = find_first_zero_bit(idtab->table, idtab->max);
if (destid < idtab->max) {
- idtab->next = destid + 1;
- if (idtab->next >= idtab->max)
- idtab->next = 0;
set_bit(destid, idtab->table);
destid += idtab->start;
} else
@@ -86,10 +81,10 @@ static u16 rio_destid_alloc(struct rio_net *net)
return (u16)destid;
}
-/*
+/**
* rio_destid_reserve - Reserve the specivied destID
- * net: RIO network
- * destid: destID to reserve
+ * @net: RIO network
+ * @destid: destID to reserve
*
* Tries to reserve the specified destID.
* Returns 0 if successfull.
@@ -106,10 +101,10 @@ static int rio_destid_reserve(struct rio_net *net, u16 destid)
return oldbit;
}
-/*
+/**
* rio_destid_free - free a previously allocated destID
- * net: RIO network
- * destid: destID to free
+ * @net: RIO network
+ * @destid: destID to free
*
* Makes the specified destID available for use.
*/
@@ -123,9 +118,9 @@ static void rio_destid_free(struct rio_net *net, u16 destid)
spin_unlock(&idtab->lock);
}
-/*
+/**
* rio_destid_first - return first destID in use
- * net: RIO network
+ * @net: RIO network
*/
static u16 rio_destid_first(struct rio_net *net)
{
@@ -142,10 +137,10 @@ static u16 rio_destid_first(struct rio_net *net)
return (u16)destid;
}
-/*
+/**
* rio_destid_next - return next destID in use
- * net: RIO network
- * from: destination ID from which search shall continue
+ * @net: RIO network
+ * @from: destination ID from which search shall continue
*/
static u16 rio_destid_next(struct rio_net *net, u16 from)
{
@@ -1163,8 +1158,8 @@ static struct rio_net __devinit *rio_alloc_net(struct rio_mport *port,
net = kzalloc(sizeof(struct rio_net), GFP_KERNEL);
if (net && do_enum) {
- net->destid_table.table = kzalloc(
- BITS_TO_LONGS(RIO_MAX_ROUTE_ENTRIES(port->sys_size)) *
+ net->destid_table.table = kcalloc(
+ BITS_TO_LONGS(RIO_MAX_ROUTE_ENTRIES(port->sys_size)),
sizeof(long),
GFP_KERNEL);
@@ -1174,7 +1169,6 @@ static struct rio_net __devinit *rio_alloc_net(struct rio_mport *port,
net = NULL;
} else {
net->destid_table.start = start;
- net->destid_table.next = 0;
net->destid_table.max =
RIO_MAX_ROUTE_ENTRIES(port->sys_size);
spin_lock_init(&net->destid_table.lock);
diff --git a/include/linux/rio.h b/include/linux/rio.h
index d2dff22..ac21ac6 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -266,7 +266,6 @@ struct rio_mport {
struct rio_id_table {
u16 start; /* logical minimal id */
- u16 next; /* hint for find */
u32 max; /* max number of IDs in table */
spinlock_t lock;
unsigned long *table;
--
1.7.8.4
^ permalink raw reply related
* [PATCH 0/3] rapidio: updates for multiple mport patches
From: Alexandre Bounine @ 2012-10-09 19:57 UTC (permalink / raw)
To: Andrew Morton, linux-kernel, linuxppc-dev; +Cc: Alexandre Bounine
This is a set of updates for patches submitted earlier:
https://lkml.org/lkml/2012/10/3/460.
Alexandre Bounine (3):
rapidio: use msleep in discovery wait
rapidio: update asynchronous discovery initialization
rapidio: update for destination ID allocation
drivers/rapidio/rio-scan.c | 40 ++++++++++-------------
drivers/rapidio/rio.c | 75 +++++++++++++++++++++++++++----------------
include/linux/rio.h | 1 -
3 files changed, 64 insertions(+), 52 deletions(-)
--
1.7.8.4
^ permalink raw reply
* [PATCH 1/3] rapidio: use msleep in discovery wait
From: Alexandre Bounine @ 2012-10-09 19:57 UTC (permalink / raw)
To: Andrew Morton, linux-kernel, linuxppc-dev; +Cc: Alexandre Bounine
In-Reply-To: <1349812676-27057-1-git-send-email-alexandre.bounine@idt.com>
Use msleep() routine for code clarity as suggested by Andrew Morton in his
comments for the original patch: https://lkml.org/lkml/2012/10/3/546.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
---
drivers/rapidio/rio-scan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 48e9041..05f0ed9 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -1391,7 +1391,7 @@ int __devinit rio_disc_mport(struct rio_mport *mport)
while (time_before(jiffies, to_end)) {
if (rio_enum_complete(mport))
goto enum_done;
- schedule_timeout_uninterruptible(msecs_to_jiffies(10));
+ msleep(10);
}
pr_debug("RIO: discovery timeout on mport %d %s\n",
--
1.7.8.4
^ permalink raw reply related
* [PATCH 2/3] rapidio: update asynchronous discovery initialization
From: Alexandre Bounine @ 2012-10-09 19:57 UTC (permalink / raw)
To: Andrew Morton, linux-kernel, linuxppc-dev; +Cc: Alexandre Bounine
In-Reply-To: <1349812676-27057-1-git-send-email-alexandre.bounine@idt.com>
Update discovery process initialization based on Andrew Morton's comments:
https://lkml.org/lkml/2012/10/3/552.
This update processes all enumerating mports first and schedules discovery
work after that. If the initialization routine fails to allocate resources
needed to execute discovery, it abandons discovery for all ports.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
---
drivers/rapidio/rio.c | 75 ++++++++++++++++++++++++++++++------------------
1 files changed, 47 insertions(+), 28 deletions(-)
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index d4bd690..c17ae22 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1275,49 +1275,68 @@ static void __devinit disc_work_handler(struct work_struct *_work)
pr_debug("RIO: discovery work for mport %d %s\n",
work->mport->id, work->mport->name);
rio_disc_mport(work->mport);
-
- kfree(work);
}
int __devinit rio_init_mports(void)
{
struct rio_mport *port;
struct rio_disc_work *work;
- int no_disc = 0;
+ int n = 0;
+
+ if (!next_portid)
+ return -ENODEV;
+ /*
+ * First, run enumerations and check if we need to perform discovery
+ * on any of the registered mports.
+ */
list_for_each_entry(port, &rio_mports, node) {
if (port->host_deviceid >= 0)
rio_enum_mport(port);
- else if (!no_disc) {
- if (!rio_wq) {
- rio_wq = alloc_workqueue("riodisc", 0, 0);
- if (!rio_wq) {
- pr_err("RIO: unable allocate rio_wq\n");
- no_disc = 1;
- continue;
- }
- }
-
- work = kzalloc(sizeof *work, GFP_KERNEL);
- if (!work) {
- pr_err("RIO: no memory for work struct\n");
- no_disc = 1;
- continue;
- }
-
- work->mport = port;
- INIT_WORK(&work->work, disc_work_handler);
- queue_work(rio_wq, &work->work);
- }
+ else
+ n++;
+ }
+
+ if (!n)
+ goto no_disc;
+
+ /*
+ * If we have mports that require discovery schedule a discovery work
+ * for each of them. If the code below fails to allocate needed
+ * resources, exit without error to keep results of enumeration
+ * process (if any).
+ * TODO: Implement restart of dicovery process for all or
+ * individual discovering mports.
+ */
+ rio_wq = alloc_workqueue("riodisc", 0, 0);
+ if (!rio_wq) {
+ pr_err("RIO: unable allocate rio_wq\n");
+ goto no_disc;
}
- if (rio_wq) {
- pr_debug("RIO: flush discovery workqueue\n");
- flush_workqueue(rio_wq);
- pr_debug("RIO: flush discovery workqueue finished\n");
+ work = kcalloc(n, sizeof *work, GFP_KERNEL);
+ if (!work) {
+ pr_err("RIO: no memory for work struct\n");
destroy_workqueue(rio_wq);
+ goto no_disc;
}
+ n = 0;
+ list_for_each_entry(port, &rio_mports, node) {
+ if (port->host_deviceid < 0) {
+ work[n].mport = port;
+ INIT_WORK(&work[n].work, disc_work_handler);
+ queue_work(rio_wq, &work[n].work);
+ n++;
+ }
+ }
+
+ flush_workqueue(rio_wq);
+ pr_debug("RIO: destroy discovery workqueue\n");
+ destroy_workqueue(rio_wq);
+ kfree(work);
+
+no_disc:
rio_init();
return 0;
--
1.7.8.4
^ permalink raw reply related
* Re: memory-hotplug : suppres "Trying to free nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning
From: Andrew Morton @ 2012-10-09 21:39 UTC (permalink / raw)
To: Yasuaki Ishimatsu
Cc: len.brown, wency, linux-acpi, x86, linux-kernel, dave, linux-mm,
paulus, minchan.kim, kosaki.motohiro, rientjes, cl, linuxppc-dev,
liuj97
In-Reply-To: <5073913A.3080103@jp.fujitsu.com>
On Tue, 9 Oct 2012 11:51:38 +0900
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote:
> > Anyway, please have a think, and see if we can come up with the best
> > and most accurate choice of types and identifiers in this code.
>
> Your concern is right. Overflow bug may occur in the future.
> So I changed type of "i" and "sections_to_remove" to "unsigned long".
> Please merge it into your tree instead of previous patch.
Too late, the original patch was merged. So I generated the delta.
I remain allergic to the `i' identifier so I renamed it to `section'.
That's not 100% accurate, but it is better.
> __remove_pages() also has same concern. So I'll fix it.
Thanks.
From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Subject: arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups
Followups to d760afd4d25 ("memory-hotplug: suppress "Trying to free
nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
- use unsigned long type, as overflows are conceivable
- rename `i' to the less-misleading and more informative `section'
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/hotplug-memory.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff -puN arch/powerpc/platforms/pseries/hotplug-memory.c~arch-powerpc-platforms-pseries-hotplug-memoryc-section-removal-cleanups arch/powerpc/platforms/pseries/hotplug-memory.c
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c~arch-powerpc-platforms-pseries-hotplug-memoryc-section-removal-cleanups
+++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -77,8 +77,9 @@ static int pseries_remove_memblock(unsig
{
unsigned long start, start_pfn;
struct zone *zone;
- int i, ret;
- int sections_to_remove;
+ int ret;
+ unsigned long section;
+ unsigned long sections_to_remove;
start_pfn = base >> PAGE_SHIFT;
@@ -99,8 +100,8 @@ static int pseries_remove_memblock(unsig
* while writing to it. So we have to defer it to here.
*/
sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
- for (i = 0; i < sections_to_remove; i++) {
- unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
+ for (section = 0; section < sections_to_remove; section++) {
+ unsigned long pfn = start_pfn + section * PAGES_PER_SECTION;
ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
if (ret)
return ret;
diff -puN mm/memory_hotplug.c~arch-powerpc-platforms-pseries-hotplug-memoryc-section-removal-cleanups mm/memory_hotplug.c
_
^ permalink raw reply
* Re: [PATCH 06/20] powerpc/xmon: Remove renaming #defines of scanhex() and skipbl()
From: Paul Mackerras @ 2012-10-09 22:15 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <1349792447-15714-6-git-send-email-michael@ellerman.id.au>
On Wed, Oct 10, 2012 at 01:20:33AM +1100, Michael Ellerman wrote:
> We have two #defines that rename scanhex() and skipbl() to
> xmon_scanhex() and xmon_skipbl() - but no one ever uses those
> names.
>
> So the only effect is to rename the actual symbols in the generated
> code, and AFACIS there is no reason to do that, so drop them.
You might as well make scanhex() and skipbl() static while you're at
it.
Paul.
^ permalink raw reply
* Re: [PATCH 10/20] powerpc/xmon: Factor out the oft-repeated setjmp logic
From: Paul Mackerras @ 2012-10-09 22:23 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <1349792447-15714-10-git-send-email-michael@ellerman.id.au>
On Wed, Oct 10, 2012 at 01:20:37AM +1100, Michael Ellerman wrote:
> We have over 15 routines that implement essentially the same logic
> in terms of catching faults. Pull the logic out into two helper
> routines.
>
> The pattern becomes:
>
> if (start_bus_error_jump() == 0) {
> <do potentially faulting things>
>
> end_bus_error_jump();
> } else {
> printf("Faulting thing faulted!\n");
> }
NAK... think about how setjmp() works. You can't return from the
function that called setjmp() while there is any possibility that
longjmp() could be called for the same jmp_buf.
Paul.
^ permalink raw reply
* linux-next: build failure after merge of the origin tree
From: Stephen Rothwell @ 2012-10-09 23:21 UTC (permalink / raw)
To: Linus Torvalds
Cc: Yasuaki Ishimatsu, linux-next, ppc-dev, linux-kernel,
Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
Hi Linus,
In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
like this:
arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
I can't see what the point of the "pfn" variable is and this patch never
appeared in linux-next before being merged. :-(
I have reverted that commit for today.
If this patch truly was authored yesterday (according the Author Date in
git), why was it merged yesterday while still under discussion? And the
latest update to it still has this build problem ... did anyone even try
to build this for powerpc (since that architecture was obviously
affected)? (Cross compilers available here
http://www.kernel.org/pub/tools/crosstool/).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the origin tree
From: Andrew Morton @ 2012-10-09 23:45 UTC (permalink / raw)
To: Stephen Rothwell
Cc: ppc-dev, Yasuaki Ishimatsu, linux-next, Linus Torvalds,
linux-kernel
In-Reply-To: <20121010102150.81c192c6fdf60689dc823b20@canb.auug.org.au>
On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Linus,
>
> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
> like this:
>
> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
>
> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
>
> I can't see what the point of the "pfn" variable is
This:
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
+++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
for (i = 0; i < sections_to_remove; i++) {
unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
- ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
+ ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
if (ret)
return ret;
}
> and this patch never
> appeared in linux-next before being merged. :-(
It was first sighted October 3.
> I have reverted that commit for today.
>
> If this patch truly was authored yesterday (according the Author Date in
> git), why was it merged yesterday while still under discussion? And the
> latest update to it still has this build problem ... did anyone even try
> to build this for powerpc (since that architecture was obviously
> affected)?
Apparently not - the ppc bit was a best-effort fixup for a patch which
addresses an x86 problem.
^ permalink raw reply
* Re: linux-next: build failure after merge of the origin tree
From: Yasuaki Ishimatsu @ 2012-10-09 23:52 UTC (permalink / raw)
To: Stephen Rothwell
Cc: ppc-dev, Andrew Morton, linux-next, Linus Torvalds, linux-kernel
In-Reply-To: <20121009164514.b7a7e227.akpm@linux-foundation.org>
Hi Stephen,
2012/10/10 8:45, Andrew Morton wrote:
> On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
>> Hi Linus,
>>
>> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
>> like this:
>>
>> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
>> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
>>
>> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
>> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
>>
>> I can't see what the point of the "pfn" variable is
>
> This:
>
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
> sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
> for (i = 0; i < sections_to_remove; i++) {
> unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> - ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
> + ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
> if (ret)
> return ret;
> }
I believe the error to be fixed with this patch.
Could you try it?
Thanks,
Yasuaki Ishimatsu
>
>> and this patch never
>> appeared in linux-next before being merged. :-(
>
> It was first sighted October 3.
>
>> I have reverted that commit for today.
>>
>> If this patch truly was authored yesterday (according the Author Date in
>> git), why was it merged yesterday while still under discussion? And the
>> latest update to it still has this build problem ... did anyone even try
>> to build this for powerpc (since that architecture was obviously
>> affected)?
>
> Apparently not - the ppc bit was a best-effort fixup for a patch which
> addresses an x86 problem.
>
^ permalink raw reply
* Re: linux-next: build failure after merge of the origin tree
From: Stephen Rothwell @ 2012-10-10 0:07 UTC (permalink / raw)
To: Andrew Morton
Cc: ppc-dev, Yasuaki Ishimatsu, linux-next, Linus Torvalds,
linux-kernel
In-Reply-To: <20121009164514.b7a7e227.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
Hi Andrew,
On Tue, 9 Oct 2012 16:45:14 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > I can't see what the point of the "pfn" variable is
>
> This:
>
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
> sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
> for (i = 0; i < sections_to_remove; i++) {
> unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> - ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
> + ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
> if (ret)
> return ret;
> }
Can we get that fix to Linus ASAP, please?
> > and this patch never
> > appeared in linux-next before being merged. :-(
>
> It was first sighted October 3.
Yeah, my mistake. But it never made it to linux-next.
> > I have reverted that commit for today.
> >
> > If this patch truly was authored yesterday (according the Author Date in
> > git), why was it merged yesterday while still under discussion? And the
> > latest update to it still has this build problem ... did anyone even try
> > to build this for powerpc (since that architecture was obviously
> > affected)?
>
> Apparently not - the ppc bit was a best-effort fixup for a patch which
> addresses an x86 problem.
Right, and that is one of the reasons we have linux-next - to test for
cross architecture problems.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 10/20] powerpc/xmon: Factor out the oft-repeated setjmp logic
From: Michael Ellerman @ 2012-10-10 0:59 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <20121009222358.GB21291@bloggs.ozlabs.ibm.com>
On Wed, 2012-10-10 at 09:23 +1100, Paul Mackerras wrote:
> On Wed, Oct 10, 2012 at 01:20:37AM +1100, Michael Ellerman wrote:
> > We have over 15 routines that implement essentially the same logic
> > in terms of catching faults. Pull the logic out into two helper
> > routines.
> >
> > The pattern becomes:
> >
> > if (start_bus_error_jump() == 0) {
> > <do potentially faulting things>
> >
> > end_bus_error_jump();
> > } else {
> > printf("Faulting thing faulted!\n");
> > }
>
> NAK... think about how setjmp() works. You can't return from the
> function that called setjmp() while there is any possibility that
> longjmp() could be called for the same jmp_buf.
Sigh, yeah. Somehow I'd convinced myself that it worked in this case,
but after a night's sleep I'm not sure what my logic was.
cheers
^ permalink raw reply
* Re: [PATCH 06/20] powerpc/xmon: Remove renaming #defines of scanhex() and skipbl()
From: Michael Ellerman @ 2012-10-10 1:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <20121009221513.GA21291@bloggs.ozlabs.ibm.com>
On Wed, 2012-10-10 at 09:15 +1100, Paul Mackerras wrote:
> On Wed, Oct 10, 2012 at 01:20:33AM +1100, Michael Ellerman wrote:
> > We have two #defines that rename scanhex() and skipbl() to
> > xmon_scanhex() and xmon_skipbl() - but no one ever uses those
> > names.
> >
> > So the only effect is to rename the actual symbols in the generated
> > code, and AFACIS there is no reason to do that, so drop them.
>
> You might as well make scanhex() and skipbl() static while you're at
> it.
Actually I was hoping to move the spu code that uses them into a
separate file, so I'll leave them for now.
cheers
^ permalink raw reply
* Re: [GIT PULL] Disintegrate UAPI for powerpc [ver #2]
From: Benjamin Herrenschmidt @ 2012-10-10 2:14 UTC (permalink / raw)
To: David Howells; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <21173.1349774149@warthog.procyon.org.uk>
On Tue, 2012-10-09 at 10:15 +0100, David Howells wrote:
> Can you merge the following branch into the powerpc tree please.
Thanks, looking at this right now. If it passes my tests I'll ask Linus
to pull later today.
Cheers,
Ben.
> This is to complete part of the UAPI disintegration for which the preparatory
> patches were pulled recently.
>
> Now that the fixups and the asm-generic chunk have been merged, I've
> regenerated the patches to get rid of those dependencies and to take account of
> any changes made so far in the merge window. If you have already pulled the
> older version of the branch aimed at you, then please feel free to ignore this
> request.
>
> The following changes since commit 9e2d8656f5e8aa214e66b462680cf86b210b74a8:
>
> Merge branch 'akpm' (Andrew's patch-bomb) (2012-10-09 16:23:15 +0900)
>
> are available in the git repository at:
>
>
> git://git.infradead.org/users/dhowells/linux-headers.git tags/disintegrate-powerpc-20121009
>
> for you to fetch changes up to c3617f72036c909e1f6086b5b9e364e0ef90a6da:
>
> UAPI: (Scripted) Disintegrate arch/powerpc/include/asm (2012-10-09 09:47:26 +0100)
>
> ----------------------------------------------------------------
> UAPI Disintegration 2012-10-09
>
> ----------------------------------------------------------------
> David Howells (1):
> UAPI: (Scripted) Disintegrate arch/powerpc/include/asm
>
> arch/powerpc/include/asm/Kbuild | 35 --
> arch/powerpc/include/asm/bootx.h | 123 +------
> arch/powerpc/include/asm/cputable.h | 35 +-
> arch/powerpc/include/asm/elf.h | 311 +-----------------
> arch/powerpc/include/asm/kvm_para.h | 70 +---
> arch/powerpc/include/asm/mman.h | 27 +-
> arch/powerpc/include/asm/nvram.h | 55 +---
> arch/powerpc/include/asm/ptrace.h | 242 +-------------
> arch/powerpc/include/asm/signal.h | 143 +-------
> arch/powerpc/include/asm/spu_info.h | 29 +-
> arch/powerpc/include/asm/swab.h | 15 +-
> arch/powerpc/include/asm/termios.h | 69 +---
> arch/powerpc/include/asm/types.h | 30 +-
> arch/powerpc/include/asm/unistd.h | 374 +--------------------
> arch/powerpc/include/uapi/asm/Kbuild | 41 +++
> arch/powerpc/include/{ => uapi}/asm/auxvec.h | 0
> arch/powerpc/include/{ => uapi}/asm/bitsperlong.h | 0
> arch/powerpc/include/uapi/asm/bootx.h | 132 ++++++++
> arch/powerpc/include/{ => uapi}/asm/byteorder.h | 0
> arch/powerpc/include/uapi/asm/cputable.h | 36 ++
> arch/powerpc/include/uapi/asm/elf.h | 307 +++++++++++++++++
> arch/powerpc/include/{ => uapi}/asm/errno.h | 0
> arch/powerpc/include/{ => uapi}/asm/fcntl.h | 0
> arch/powerpc/include/{ => uapi}/asm/ioctl.h | 0
> arch/powerpc/include/{ => uapi}/asm/ioctls.h | 0
> arch/powerpc/include/{ => uapi}/asm/ipcbuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/kvm.h | 0
> arch/powerpc/include/uapi/asm/kvm_para.h | 90 +++++
> arch/powerpc/include/{ => uapi}/asm/linkage.h | 0
> arch/powerpc/include/uapi/asm/mman.h | 31 ++
> arch/powerpc/include/{ => uapi}/asm/msgbuf.h | 0
> arch/powerpc/include/uapi/asm/nvram.h | 62 ++++
> arch/powerpc/include/{ => uapi}/asm/param.h | 0
> arch/powerpc/include/{ => uapi}/asm/poll.h | 0
> arch/powerpc/include/{ => uapi}/asm/posix_types.h | 0
> arch/powerpc/include/{ => uapi}/asm/ps3fb.h | 0
> arch/powerpc/include/uapi/asm/ptrace.h | 259 +++++++++++++++
> arch/powerpc/include/{ => uapi}/asm/resource.h | 0
> arch/powerpc/include/{ => uapi}/asm/seccomp.h | 0
> arch/powerpc/include/{ => uapi}/asm/sembuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/setup.h | 0
> arch/powerpc/include/{ => uapi}/asm/shmbuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/sigcontext.h | 0
> arch/powerpc/include/{ => uapi}/asm/siginfo.h | 0
> arch/powerpc/include/uapi/asm/signal.h | 145 +++++++++
> arch/powerpc/include/{ => uapi}/asm/socket.h | 0
> arch/powerpc/include/{ => uapi}/asm/sockios.h | 0
> arch/powerpc/include/uapi/asm/spu_info.h | 53 +++
> arch/powerpc/include/{ => uapi}/asm/stat.h | 0
> arch/powerpc/include/{ => uapi}/asm/statfs.h | 0
> arch/powerpc/include/uapi/asm/swab.h | 23 ++
> arch/powerpc/include/{ => uapi}/asm/termbits.h | 0
> arch/powerpc/include/uapi/asm/termios.h | 76 +++++
> arch/powerpc/include/uapi/asm/types.h | 40 +++
> arch/powerpc/include/{ => uapi}/asm/ucontext.h | 0
> arch/powerpc/include/uapi/asm/unistd.h | 380 ++++++++++++++++++++++
> 56 files changed, 1705 insertions(+), 1528 deletions(-)
> rename arch/powerpc/include/{ => uapi}/asm/auxvec.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/bitsperlong.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/bootx.h
> rename arch/powerpc/include/{ => uapi}/asm/byteorder.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/cputable.h
> create mode 100644 arch/powerpc/include/uapi/asm/elf.h
> rename arch/powerpc/include/{ => uapi}/asm/errno.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/fcntl.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ioctl.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ioctls.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ipcbuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/kvm.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/kvm_para.h
> rename arch/powerpc/include/{ => uapi}/asm/linkage.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/mman.h
> rename arch/powerpc/include/{ => uapi}/asm/msgbuf.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/nvram.h
> rename arch/powerpc/include/{ => uapi}/asm/param.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/poll.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/posix_types.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ps3fb.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/ptrace.h
> rename arch/powerpc/include/{ => uapi}/asm/resource.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/seccomp.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sembuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/setup.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/shmbuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sigcontext.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/siginfo.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/signal.h
> rename arch/powerpc/include/{ => uapi}/asm/socket.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sockios.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/spu_info.h
> rename arch/powerpc/include/{ => uapi}/asm/stat.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/statfs.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/swab.h
> rename arch/powerpc/include/{ => uapi}/asm/termbits.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/termios.h
> create mode 100644 arch/powerpc/include/uapi/asm/types.h
> rename arch/powerpc/include/{ => uapi}/asm/ucontext.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/unistd.h
> .
^ permalink raw reply
* Re: linux-next: build failure after merge of the origin tree
From: Stephen Rothwell @ 2012-10-10 3:12 UTC (permalink / raw)
To: Yasuaki Ishimatsu
Cc: ppc-dev, Andrew Morton, linux-next, Linus Torvalds, linux-kernel
In-Reply-To: <5074B8B5.3010307@jp.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]
Hi,
On Wed, 10 Oct 2012 08:52:21 +0900 Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote:
>
> 2012/10/10 8:45, Andrew Morton wrote:
> > On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> >> Hi Linus,
> >>
> >> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
> >> like this:
> >>
> >> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
> >> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
> >>
> >> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
> >> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
> >>
> >> I can't see what the point of the "pfn" variable is
> >
> > This:
> >
> > --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> > +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> > @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
> > sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
> > for (i = 0; i < sections_to_remove; i++) {
> > unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> > - ret = __remove_pages(zone, start_pfn, PAGES_PER_SECTION);
> > + ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
> > if (ret)
> > return ret;
> > }
>
> I believe the error to be fixed with this patch.
> Could you try it?
The certainly fixes the build problem. I can't comment in the semantics
of the patch.
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> (Build only)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [GIT PULL] Disintegrate UAPI for powerpc [ver #2]
From: Benjamin Herrenschmidt @ 2012-10-10 4:36 UTC (permalink / raw)
To: David Howells, Linus Torvalds; +Cc: Andrew Morton, linuxppc-dev, linux-kernel
In-Reply-To: <21173.1349774149@warthog.procyon.org.uk>
On Tue, 2012-10-09 at 10:15 +0100, David Howells wrote:
> Can you merge the following branch into the powerpc tree please.
>
> This is to complete part of the UAPI disintegration for which the preparatory
> patches were pulled recently.
This is now in the powerpc "merge" branch:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
Linus, free free to pull it.
Note that upstream Linus (and thus this branch) fails to build powerpc
configs with memory hotplug enabled due to Andrew merging a completely
untested and un-next'ed patch :-) (tsk tsk tsk !)
I assume you (Andrew) already has a fix on its way to Linus so I haven't
put it in this branch.
Cheers,
Ben.
> Now that the fixups and the asm-generic chunk have been merged, I've
> regenerated the patches to get rid of those dependencies and to take account of
> any changes made so far in the merge window. If you have already pulled the
> older version of the branch aimed at you, then please feel free to ignore this
> request.
>
> The following changes since commit 9e2d8656f5e8aa214e66b462680cf86b210b74a8:
>
> Merge branch 'akpm' (Andrew's patch-bomb) (2012-10-09 16:23:15 +0900)
>
> are available in the git repository at:
>
>
> git://git.infradead.org/users/dhowells/linux-headers.git tags/disintegrate-powerpc-20121009
>
> for you to fetch changes up to c3617f72036c909e1f6086b5b9e364e0ef90a6da:
>
> UAPI: (Scripted) Disintegrate arch/powerpc/include/asm (2012-10-09 09:47:26 +0100)
>
> ----------------------------------------------------------------
> UAPI Disintegration 2012-10-09
>
> ----------------------------------------------------------------
> David Howells (1):
> UAPI: (Scripted) Disintegrate arch/powerpc/include/asm
>
> arch/powerpc/include/asm/Kbuild | 35 --
> arch/powerpc/include/asm/bootx.h | 123 +------
> arch/powerpc/include/asm/cputable.h | 35 +-
> arch/powerpc/include/asm/elf.h | 311 +-----------------
> arch/powerpc/include/asm/kvm_para.h | 70 +---
> arch/powerpc/include/asm/mman.h | 27 +-
> arch/powerpc/include/asm/nvram.h | 55 +---
> arch/powerpc/include/asm/ptrace.h | 242 +-------------
> arch/powerpc/include/asm/signal.h | 143 +-------
> arch/powerpc/include/asm/spu_info.h | 29 +-
> arch/powerpc/include/asm/swab.h | 15 +-
> arch/powerpc/include/asm/termios.h | 69 +---
> arch/powerpc/include/asm/types.h | 30 +-
> arch/powerpc/include/asm/unistd.h | 374 +--------------------
> arch/powerpc/include/uapi/asm/Kbuild | 41 +++
> arch/powerpc/include/{ => uapi}/asm/auxvec.h | 0
> arch/powerpc/include/{ => uapi}/asm/bitsperlong.h | 0
> arch/powerpc/include/uapi/asm/bootx.h | 132 ++++++++
> arch/powerpc/include/{ => uapi}/asm/byteorder.h | 0
> arch/powerpc/include/uapi/asm/cputable.h | 36 ++
> arch/powerpc/include/uapi/asm/elf.h | 307 +++++++++++++++++
> arch/powerpc/include/{ => uapi}/asm/errno.h | 0
> arch/powerpc/include/{ => uapi}/asm/fcntl.h | 0
> arch/powerpc/include/{ => uapi}/asm/ioctl.h | 0
> arch/powerpc/include/{ => uapi}/asm/ioctls.h | 0
> arch/powerpc/include/{ => uapi}/asm/ipcbuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/kvm.h | 0
> arch/powerpc/include/uapi/asm/kvm_para.h | 90 +++++
> arch/powerpc/include/{ => uapi}/asm/linkage.h | 0
> arch/powerpc/include/uapi/asm/mman.h | 31 ++
> arch/powerpc/include/{ => uapi}/asm/msgbuf.h | 0
> arch/powerpc/include/uapi/asm/nvram.h | 62 ++++
> arch/powerpc/include/{ => uapi}/asm/param.h | 0
> arch/powerpc/include/{ => uapi}/asm/poll.h | 0
> arch/powerpc/include/{ => uapi}/asm/posix_types.h | 0
> arch/powerpc/include/{ => uapi}/asm/ps3fb.h | 0
> arch/powerpc/include/uapi/asm/ptrace.h | 259 +++++++++++++++
> arch/powerpc/include/{ => uapi}/asm/resource.h | 0
> arch/powerpc/include/{ => uapi}/asm/seccomp.h | 0
> arch/powerpc/include/{ => uapi}/asm/sembuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/setup.h | 0
> arch/powerpc/include/{ => uapi}/asm/shmbuf.h | 0
> arch/powerpc/include/{ => uapi}/asm/sigcontext.h | 0
> arch/powerpc/include/{ => uapi}/asm/siginfo.h | 0
> arch/powerpc/include/uapi/asm/signal.h | 145 +++++++++
> arch/powerpc/include/{ => uapi}/asm/socket.h | 0
> arch/powerpc/include/{ => uapi}/asm/sockios.h | 0
> arch/powerpc/include/uapi/asm/spu_info.h | 53 +++
> arch/powerpc/include/{ => uapi}/asm/stat.h | 0
> arch/powerpc/include/{ => uapi}/asm/statfs.h | 0
> arch/powerpc/include/uapi/asm/swab.h | 23 ++
> arch/powerpc/include/{ => uapi}/asm/termbits.h | 0
> arch/powerpc/include/uapi/asm/termios.h | 76 +++++
> arch/powerpc/include/uapi/asm/types.h | 40 +++
> arch/powerpc/include/{ => uapi}/asm/ucontext.h | 0
> arch/powerpc/include/uapi/asm/unistd.h | 380 ++++++++++++++++++++++
> 56 files changed, 1705 insertions(+), 1528 deletions(-)
> rename arch/powerpc/include/{ => uapi}/asm/auxvec.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/bitsperlong.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/bootx.h
> rename arch/powerpc/include/{ => uapi}/asm/byteorder.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/cputable.h
> create mode 100644 arch/powerpc/include/uapi/asm/elf.h
> rename arch/powerpc/include/{ => uapi}/asm/errno.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/fcntl.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ioctl.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ioctls.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ipcbuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/kvm.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/kvm_para.h
> rename arch/powerpc/include/{ => uapi}/asm/linkage.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/mman.h
> rename arch/powerpc/include/{ => uapi}/asm/msgbuf.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/nvram.h
> rename arch/powerpc/include/{ => uapi}/asm/param.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/poll.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/posix_types.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/ps3fb.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/ptrace.h
> rename arch/powerpc/include/{ => uapi}/asm/resource.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/seccomp.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sembuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/setup.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/shmbuf.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sigcontext.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/siginfo.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/signal.h
> rename arch/powerpc/include/{ => uapi}/asm/socket.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/sockios.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/spu_info.h
> rename arch/powerpc/include/{ => uapi}/asm/stat.h (100%)
> rename arch/powerpc/include/{ => uapi}/asm/statfs.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/swab.h
> rename arch/powerpc/include/{ => uapi}/asm/termbits.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/termios.h
> create mode 100644 arch/powerpc/include/uapi/asm/types.h
> rename arch/powerpc/include/{ => uapi}/asm/ucontext.h (100%)
> create mode 100644 arch/powerpc/include/uapi/asm/unistd.h
> .
^ permalink raw reply
* [RESEND PATCH v1 0/3] cpuidle: (pSeries) pseries idle driver fixes.
From: Deepthi Dharwar @ 2012-10-10 7:29 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, benh
The following series consists of a bunch of fixes for
cpuidle back-end driver for ppc64 (pSeries) platform.
The series applies on 3.6-rc7 and has been tested on ppc64 pSeries
POWER7 system with snooze and nap states.
With these fixes, avg idle residency for nap on 50 percent idle system
increased from 96 to 99.4 percent and idle residency for snooze for
the same decreased from 4 to 0.6 percent, determined running spec power
benchmark runs.
Deepthi Dharwar (3):
cpuidle: (POWER) Fix snooze state problem persistant in the current cpuidle design on pseries.
cpuidle: (POWER) Fix smt_snooze_delay functionality.
cpuidle: (POWER) Fix target residency initialisation in pseries cpuidle
arch/powerpc/include/asm/processor.h | 4 +
arch/powerpc/kernel/sysfs.c | 2 -
arch/powerpc/platforms/pseries/processor_idle.c | 62 +++++++++++------------
3 files changed, 32 insertions(+), 36 deletions(-)
-- Deepthi
^ permalink raw reply
* [RESEND PATCH v1 2/3] cpuidle: (POWER) Fix smt_snooze_delay functionality.
From: Deepthi Dharwar @ 2012-10-10 7:29 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, benh
In-Reply-To: <20121010072859.29317.71472.stgit@deepthi.in.ibm.com>
smt_snooze_delay was designed to delay idle loop's nap entry
in the native idle code before it got ported over to use as part of
the cpuidle framework.
A -ve value assigned to smt_snooze_delay should result in
busy looping, in other words disabling the entry to nap state.
- https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082450.html
This particular functionality can be achieved currently by
echo 1 > /sys/devices/system/cpu/cpu*/state1/disable
but it is broken when one assigns -ve value to the smt_snooze_delay
variable either via sysfs entry or ppc64_cpu util.
This patch aims to fix this, by disabling nap state when smt_snooze_delay
variable is set to -ve value.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/processor.h | 4 ++--
arch/powerpc/kernel/sysfs.c | 2 +-
arch/powerpc/platforms/pseries/processor_idle.c | 24 ++++++++++++++++-------
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 9dc5cd1..7e44855 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -391,9 +391,9 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */
extern void power7_nap(void);
#ifdef CONFIG_PSERIES_IDLE
-extern void update_smt_snooze_delay(int snooze);
+extern void update_smt_snooze_delay(int cpu, int residency);
#else
-static inline void update_smt_snooze_delay(int snooze) {}
+static inline void update_smt_snooze_delay(int cpu, int residency) {}
#endif
extern void flush_instruction_cache(void);
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 8302af6..cf357a0 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -50,7 +50,7 @@ static ssize_t store_smt_snooze_delay(struct device *dev,
return -EINVAL;
per_cpu(smt_snooze_delay, cpu->dev.id) = snooze;
- update_smt_snooze_delay(snooze);
+ update_smt_snooze_delay(cpu->dev.id, snooze);
return count;
}
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 02e425a..a32d56d 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -33,13 +33,6 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1;
static struct cpuidle_device __percpu *pseries_cpuidle_devices;
static struct cpuidle_state *cpuidle_state_table;
-void update_smt_snooze_delay(int snooze)
-{
- struct cpuidle_driver *drv = cpuidle_get_driver();
- if (drv)
- drv->states[0].target_residency = snooze;
-}
-
static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before)
{
@@ -190,6 +183,23 @@ static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = {
.enter = &shared_cede_loop },
};
+void update_smt_snooze_delay(int cpu, int residency)
+{
+ struct cpuidle_driver *drv = cpuidle_get_driver();
+ struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu);
+
+ if (cpuidle_state_table != dedicated_states)
+ return;
+
+ if (residency < 0) {
+ /* Disable the Nap state on that cpu */
+ if (dev)
+ dev->states_usage[1].disable = 1;
+ } else
+ if (drv)
+ drv->states[0].target_residency = residency;
+}
+
static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,
unsigned long action, void *hcpu)
{
^ permalink raw reply related
* [RESEND PATCH v1 3/3] cpuidle: (POWER) Fix snooze state problem persistant in the current cpuidle design on pseries.
From: Deepthi Dharwar @ 2012-10-10 7:29 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, benh
In-Reply-To: <20121010072859.29317.71472.stgit@deepthi.in.ibm.com>
Earlier without cpuidle framework on pseries, the native arch
idle routine comprised of both snooze and nap
states. smt_snooze_delay variable was used to delay
the idle process entry to deeper idle state like nap.
With the coming of cpuidle, this arch specific idle was replaced
by two different idle routines, one for supporting snooze and other
for nap. This enabled addition of more
low level idle states on pseries in the future.
On adopting the generic cpuidle framework for POWER systems,
the decision of which idle state to choose from, given a predicted
idle time is taken by the menu governor based on
target_residency and exit_latency of the idle states.
target_residency is the minimum time to be resident in that idle state.
Exit_latency is time taken to exit out of idle state.
Deeper the idle state, both the target residency and exit latency
would be higher.
In the current design, smt_snooze_delay is used as target_residency
for the snooze state which is incorrect, as it is not the
minimum but the maximum duration to be in snooze state.
This would result in the governor in taking bad decision,
as presently target_residency of nap < target_residency of snooze
inspite of nap being deeper idle state.
This patch aims to fix this problem by replacing the smt_snooze_delay loop
in snooze state, with the need_resched() as the governor is aware of
entry and exit of various idle transitions based on which
next idle time prediction.
The governor is intelligent enough to determine the idle state the needs to
be transitioned to and maintains a whole of heuristics including
io load, previous idle states predictions etc for the same, based on
which idle state entry decision is taken.
With this fix, of setting target_residency of snooze to 0
nap to smt_snooze_delay
if the predicted idle time is less
than smt_snooze_delay (target_residency of nap)
value governor would pick snooze state, else nap. This adhers to the
previous native idle design.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/processor_idle.c | 36 ++++++++---------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index a32d56d..45d00e5 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -59,32 +59,22 @@ static int snooze_loop(struct cpuidle_device *dev,
{
unsigned long in_purr;
ktime_t kt_before;
- unsigned long start_snooze;
- long snooze = drv->states[0].target_residency;
+ int cpu = dev->cpu;
idle_loop_prolog(&in_purr, &kt_before);
+ local_irq_enable();
+ set_thread_flag(TIF_POLLING_NRFLAG);
- if (snooze) {
- start_snooze = get_tb() + snooze * tb_ticks_per_usec;
- local_irq_enable();
- set_thread_flag(TIF_POLLING_NRFLAG);
-
- while ((snooze < 0) || (get_tb() < start_snooze)) {
- if (need_resched() || cpu_is_offline(dev->cpu))
- goto out;
- ppc64_runlatch_off();
- HMT_low();
- HMT_very_low();
- }
-
- HMT_medium();
- clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb();
- local_irq_disable();
+ while ((!need_resched()) && cpu_online(cpu)) {
+ ppc64_runlatch_off();
+ HMT_low();
+ HMT_very_low();
}
-out:
HMT_medium();
+ clear_thread_flag(TIF_POLLING_NRFLAG);
+ smp_mb();
+
dev->last_residency =
(int)idle_loop_epilog(in_purr, kt_before);
return index;
@@ -165,8 +155,8 @@ static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = {
.name = "CEDE",
.desc = "CEDE",
.flags = CPUIDLE_FLAG_TIME_VALID,
- .exit_latency = 1,
- .target_residency = 10,
+ .exit_latency = 10,
+ .target_residency = 100,
.enter = &dedicated_cede_loop },
};
@@ -197,7 +187,7 @@ void update_smt_snooze_delay(int cpu, int residency)
dev->states_usage[1].disable = 1;
} else
if (drv)
- drv->states[0].target_residency = residency;
+ drv->states[1].target_residency = residency;
}
static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n,
^ permalink raw reply related
* [RESEND PATCH v1 1/3] cpuidle: (POWER) Fix target residency initialisation in pseries cpuidle
From: Deepthi Dharwar @ 2012-10-10 7:29 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, benh
In-Reply-To: <20121010072859.29317.71472.stgit@deepthi.in.ibm.com>
Remove the redundant target residency initialisation in pseries_cpuidle_driver_init().
This is currently over-writing the residency time updated as part of the static
table, resulting in all the idle states having the same target
residency of 100us which is incorrect. This may result in the menu governor making
wrong state decisions.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/processor_idle.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c
index 455760b..02e425a 100644
--- a/arch/powerpc/platforms/pseries/processor_idle.c
+++ b/arch/powerpc/platforms/pseries/processor_idle.c
@@ -246,10 +246,6 @@ static int pseries_cpuidle_driver_init(void)
drv->states[drv->state_count] = /* structure copy */
cpuidle_state_table[idle_state];
- if (cpuidle_state_table == dedicated_states)
- drv->states[drv->state_count].target_residency =
- __get_cpu_var(smt_snooze_delay);
-
drv->state_count += 1;
}
^ permalink raw reply related
* [PATCH 3.6.0- 2/2] powerpc/sysdev: use module_platform_driver macro
From: Srinivas KANDAGATLA @ 2012-10-10 18:32 UTC (permalink / raw)
To: grant.likely; +Cc: krafft, agust, linuxppc-dev, srinivas.kandagatla
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
This patch removes some code duplication by using
module_platform_driver.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
---
arch/powerpc/sysdev/pmi.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index 8f04654..5aaf86c 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -214,18 +214,7 @@ static struct platform_driver pmi_of_platform_driver = {
.of_match_table = pmi_match,
},
};
-
-static int __init pmi_module_init(void)
-{
- return platform_driver_register(&pmi_of_platform_driver);
-}
-module_init(pmi_module_init);
-
-static void __exit pmi_module_exit(void)
-{
- platform_driver_unregister(&pmi_of_platform_driver);
-}
-module_exit(pmi_module_exit);
+module_platform_driver(pmi_of_platform_driver);
int pmi_send_message(pmi_message_t msg)
{
--
1.7.0.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox