* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Benjamin Herrenschmidt @ 2012-04-26 9:19 UTC (permalink / raw)
To: Andreas Schwab; +Cc: khali, linuxppc-dev
In-Reply-To: <m2liliam9w.fsf@igel.home>
On Thu, 2012-04-26 at 11:13 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > What if you just comment out the tickle code ?
>
> I haven't tried it yet, but I suspect it won't tickle the fcu any more
> since wf_control_set avoids writing an unchanged value (unlike the old
> driver).
Sure, the question is whether that fixes the "annoyance" :-)
I don't think we really need to tickle the FCU as long as we have that
#define set in windfarm_fcu to use the actual fan values rather than the
programmed one.
In fact, can you change that define around and see if it makes it behave
more like therm_pm72 overall ? IE That's the only -known- difference
between the old and new driver (+/- a bug / typo / etc..)
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Andreas Schwab @ 2012-04-26 9:13 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: khali, linuxppc-dev
In-Reply-To: <1335391128.21961.55.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> What if you just comment out the tickle code ?
I haven't tried it yet, but I suspect it won't tickle the fcu any more
since wf_control_set avoids writing an unchanged value (unlike the old
driver).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* (no subject)
From: Jessica Wang @ 2012-04-26 3:49 UTC (permalink / raw)
To: Linuxppc-dev
please remove me from the list... thanks
^ permalink raw reply
* RE: [PATCH] fsldma: fix performance degradation by optimizing spinlock use.
From: Li Yang-R58472 @ 2012-04-26 2:59 UTC (permalink / raw)
To: Shi Xuelin-B29237, dan.j.williams@intel.com, vinod.koul@intel.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Ira W. Snyder
In-Reply-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tcGxldGUoY29v
a2llLCBsYXN0X2NvbXBsZXRlLCBsYXN0X3VzZWQpOyB9DQo+ID4gLS0NCj4gPiAxLjcuMC40DQo+
ID4NCj4gPg0KDQo=
^ permalink raw reply
* RE: [PATCH] fsldma: fix performance degradation by optimizing spinlock use.
From: Shi Xuelin-B29237 @ 2012-04-26 2:03 UTC (permalink / raw)
To: dan.j.williams@intel.com
Cc: vinod.koul@intel.com, Li Yang-R58472,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Ira W. Snyder
In-Reply-To: <20120111161347.GA1430@ovro.caltech.edu>
SGkgRGFuIFdpbGxpYW1zLA0KDQpEbyB5b3UgaGF2ZSBhbnkgY29tbWVudCBhYm91dCB0aGlzIHBh
dGNoPw0KDQpUaGFua3MsDQpGb3JyZXN0DQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpG
cm9tOiBJcmEgVy4gU255ZGVyIFttYWlsdG86aXdzQG92cm8uY2FsdGVjaC5lZHVdIA0KU2VudDog
MjAxMuW5tDHmnIgxMuaXpSAwOjE0DQpUbzogU2hpIFh1ZWxpbi1CMjkyMzcNCkNjOiB2aW5vZC5r
b3VsQGludGVsLmNvbTsgZGFuLmoud2lsbGlhbXNAaW50ZWwuY29tOyBsaW51eHBwYy1kZXZAbGlz
dHMub3psYWJzLm9yZzsgbGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZw0KU3ViamVjdDogUmU6
IFtQQVRDSF0gZnNsZG1hOiBmaXggcGVyZm9ybWFuY2UgZGVncmFkYXRpb24gYnkgb3B0aW1pemlu
ZyBzcGlubG9jayB1c2UuDQoNCk9uIFdlZCwgSmFuIDExLCAyMDEyIGF0IDA3OjU0OjU1QU0gKzAw
MDAsIFNoaSBYdWVsaW4tQjI5MjM3IHdyb3RlOg0KPiBIZWxsbyBJcmlzLA0KPiANCj4gQXMgd2Ug
ZGlzY3Vzc2VkIGluIHRoZSBwcmV2aW91cyBwYXRjaCwgSSBhZGQ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Jxc2F2ZSgmY2hhbi0+ZGVzY19sb2NrLCBmbGFncyk7DQo+ICANCj4gCWxhc3RfY29tcGxldGUg
PSBjaGFuLT5jb21wbGV0ZWRfY29va2llOw0KPiArCXNtcF9tYigpOw0KPiAJbGFzdF91c2VkID0g
ZGNoYW4tPmNvb2tpZTsNCj4gIA0KPiAtCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJmNoYW4tPmRl
c2NfbG9jaywgZmxhZ3MpOw0KPiAtDQo+ICAJZG1hX3NldF90eF9zdGF0ZSh0eHN0YXRlLCBsYXN0
X2NvbXBsZXRlLCBsYXN0X3VzZWQsIDApOw0KPiAgCXJldHVybiBkbWFfYXN5bmNfaXNfY29tcGxl
dGUoY29va2llLCBsYXN0X2NvbXBsZXRlLCBsYXN0X3VzZWQpOyB9DQo+IC0tDQo+IDEuNy4wLjQN
Cj4gDQo+IA0KDQo=
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Benjamin Herrenschmidt @ 2012-04-25 21:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: khali, linuxppc-dev
In-Reply-To: <m2aa1zxyt7.fsf@igel.home>
On Wed, 2012-04-25 at 23:54 +0200, Andreas Schwab wrote:
>
> This fuzzing is what makes it much more annoying.
>
Interesting, I didn't think that couple of percent of pwm would be
noticable (there's probably too much ambiant noise in the lab here for
me to notice).
What if you just comment out the tickle code ?
In theory it's only needed if we haven't changed any fan speed for a
long time (the FCU can then timeout and assume we aren't driving it,
ramping up all fans to full speed). I could implement that a bit more
intelligently.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Andreas Schwab @ 2012-04-25 21:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: khali, linuxppc-dev
In-Reply-To: <1335388465.21961.35.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> Constant or changing ? The slots fan is set to a fixed speed, which I
> thought was constant (well, I "tickle" it a bit but roughly it's
> constant).
This fuzzing is what makes it much more annoying.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: Regression in 32-bit ppc kernel
From: Benjamin Herrenschmidt @ 2012-04-25 21:44 UTC (permalink / raw)
To: Larry Finger; +Cc: linuxppc-dev, Paul Mackerras, LKML
In-Reply-To: <4F98117C.7080309@lwfinger.net>
On Wed, 2012-04-25 at 10:00 -0500, Larry Finger wrote:
>
> After a few tries, I managed to change over to pata_macio.
> Fortunately, most of
> the system used dev-by-id or UUID, thus most of the process was
> getting all the
> kernel pieces built in.
>
> Unfortunately, the original problem remains. I have resumed the
> bisecting - only
> 11 steps to go. I should have it by Friday! :)
>
Thanks !
Do we know what the bad interrupt maps to ? Also what is the value of
NR_IRQ and do you have SPARSE_IRQ enabled ? Can you try with the latter
disabled and NR_IRQ set to something large, such as 128 ?
(You may be able to check the interrupt mapping in debugfs)
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Benjamin Herrenschmidt @ 2012-04-25 21:14 UTC (permalink / raw)
To: Andreas Schwab; +Cc: khali, linuxppc-dev
In-Reply-To: <m2sjfs85pv.fsf@igel.home>
On Wed, 2012-04-25 at 12:29 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > Also, does the new driver properly react to load ?
>
> The old driver keeps the cpu fans running at 300 rpm (lowest speed?)
> for much longer when the cpus are put busy. Only when the cpus are back
> idle it speeds them up to 1200 rpm or more for some time depending on
> how long the cpus were busy. The new driver is faster at speeding up
> the fans to around 800 rpm when cpus get busy, and keeps them running
> longer at that speed, but doesn't appear to select much higher speeds.
>
> The old driver appears to be better suited to desktops, whereas the new
> driver is probably better for servers.
That's odd... as I said, the algorithm is supposed to be the same...
> But the most annoying sound appears to be coming from the slots fan.
Constant or changing ? The slots fan is set to a fixed speed, which I
thought was constant (well, I "tickle" it a bit but roughly it's
constant). Or is that not the case for you ?
Darwin has an algorithm for it based on getting some data from the video
driver in the AGP slot, but I don't have that.
Cheers,
Ben.
^ permalink raw reply
* [PATCH 08/10] powerpc/ps3: Minor Kconfig cleanup
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: cbe-oss-dev, Andre Heider, linuxppc-dev
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index b72425a..46b7f02 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -73,7 +73,7 @@ config PS3_PS3AV
help
Include support for the PS3 AV Settings driver.
- This support is required for graphics and sound. In
+ This support is required for PS3 graphics and sound. In
general, all users will say Y or M.
config PS3_SYS_MANAGER
@@ -84,7 +84,7 @@ config PS3_SYS_MANAGER
help
Include support for the PS3 System Manager.
- This support is required for system control. In
+ This support is required for PS3 system control. In
general, all users will say Y or M.
config PS3_REPOSITORY_WRITE
@@ -134,7 +134,7 @@ config PS3_FLASH
This support is required to access the PS3 FLASH ROM, which
contains the boot loader and some boot options.
- In general, all users will say Y or M.
+ In general, PS3 OtherOS users will say Y or M.
As this driver needs a fixed buffer of 256 KiB of memory, it can
be disabled on the kernel command line using "ps3flash=off", to
@@ -168,7 +168,7 @@ config PS3GELIC_UDBG
via the Ethernet port (UDP port number 18194).
This driver uses a trivial implementation and is independent
- from the main network driver.
+ from the main PS3 gelic network driver.
If in doubt, say N here.
--
1.7.9.5
^ permalink raw reply related
* [PATCH 10/10] powerpc/ps3: Refresh ps3_defconfig
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: cbe-oss-dev, linuxppc-dev
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/configs/ps3_defconfig | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index ded8678..c2f4b4a 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -6,7 +6,6 @@ CONFIG_NR_CPUS=2
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
-CONFIG_SPARSE_IRQ=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
@@ -25,7 +24,6 @@ CONFIG_PS3_DISK=y
CONFIG_PS3_ROM=y
CONFIG_PS3_FLASH=y
CONFIG_PS3_VRAM=m
-CONFIG_PS3_LPM=m
# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
CONFIG_HIGH_RES_TIMERS=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
@@ -53,8 +51,6 @@ CONFIG_IP_PNP_DHCP=y
# CONFIG_INET_DIAG is not set
CONFIG_IPV6=y
CONFIG_BT=m
-CONFIG_BT_L2CAP=y
-CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
@@ -63,7 +59,6 @@ CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
CONFIG_BT_HCIBTUSB=m
CONFIG_CFG80211=m
-# CONFIG_WIRELESS_EXT_SYSFS is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_RC_PID=y
# CONFIG_MAC80211_RC_MINSTREL is not set
@@ -181,7 +176,6 @@ CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_WRITECOUNT=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_LIST=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_FTRACE is not set
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_CRYPTO_CCM=m
--
1.7.9.5
^ permalink raw reply related
* [PATCH 09/10] drivers/ps3: Fix checkpatch warnings in ps3av.c
From: Valentin Ilie @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Geert Uytterhoeven, linuxppc-dev, Valentin Ilie
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
drivers/ps3/ps3av.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index a409fa0..93d0a8b 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -338,7 +338,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
mutex_unlock(&ps3av->mutex);
return 0;
- err:
+err:
mutex_unlock(&ps3av->mutex);
printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
return res;
@@ -477,7 +477,6 @@ int ps3av_set_audio_mode(u32 ch, u32 fs, u32 word_bits, u32 format, u32 source)
return 0;
}
-
EXPORT_SYMBOL_GPL(ps3av_set_audio_mode);
static int ps3av_set_videomode(void)
@@ -501,7 +500,7 @@ static void ps3av_set_videomode_packet(u32 id)
video_mode = &video_mode_table[id & PS3AV_MODE_MASK];
- avb_param.num_of_video_pkt = PS3AV_AVB_NUM_VIDEO; /* num of head */
+ avb_param.num_of_video_pkt = PS3AV_AVB_NUM_VIDEO; /* num of head */
avb_param.num_of_audio_pkt = 0;
avb_param.num_of_av_video_pkt = ps3av->av_hw_conf.num_of_hdmi +
ps3av->av_hw_conf.num_of_avmulti;
@@ -521,7 +520,7 @@ static void ps3av_set_videomode_packet(u32 id)
#ifndef PS3AV_HDMI_YUV
if (ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_0 ||
ps3av->av_port[i] == PS3AV_CMD_AVPORT_HDMI_1)
- av_video_cs = RGB8; /* use RGB for HDMI */
+ av_video_cs = RGB8; /* use RGB for HDMI */
#endif
len += ps3av_cmd_set_av_video_cs(&avb_param.buf[len],
ps3av->av_port[i],
@@ -590,8 +589,8 @@ static void ps3avd(struct work_struct *work)
#define SHIFT_VESA 8
static const struct {
- unsigned mask : 19;
- unsigned id : 4;
+ unsigned mask:19;
+ unsigned id:4;
} ps3av_preferred_modes[] = {
{ PS3AV_RESBIT_WUXGA << SHIFT_VESA, PS3AV_MODE_WUXGA },
{ PS3AV_RESBIT_1920x1080P << SHIFT_60, PS3AV_MODE_1080P60 },
@@ -667,7 +666,8 @@ static enum ps3av_mode_num ps3av_hdmi_get_id(struct ps3av_info_monitor *info)
return id;
}
-static void ps3av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *monitor_info)
+static void ps3av_monitor_info_dump(
+ const struct ps3av_pkt_av_get_monitor_info *monitor_info)
{
const struct ps3av_info_monitor *info = &monitor_info->info;
const struct ps3av_info_audio *audio = info->audio;
@@ -717,8 +717,8 @@ static void ps3av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *
/* audio block */
for (i = 0; i < info->num_of_audio_block; i++) {
- pr_debug("audio[%d] type: %02x max_ch: %02x fs: %02x sbit: "
- "%02x\n",
+ pr_debug(
+ "audio[%d] type: %02x max_ch: %02x fs: %02x sbit: %02x\n",
i, audio->type, audio->max_num_of_ch, audio->fs,
audio->sbit);
audio++;
@@ -870,21 +870,18 @@ int ps3av_set_video_mode(int id)
return 0;
}
-
EXPORT_SYMBOL_GPL(ps3av_set_video_mode);
int ps3av_get_auto_mode(void)
{
return ps3av_auto_videomode(&ps3av->av_hw_conf);
}
-
EXPORT_SYMBOL_GPL(ps3av_get_auto_mode);
int ps3av_get_mode(void)
{
return ps3av ? ps3av->ps3av_mode : 0;
}
-
EXPORT_SYMBOL_GPL(ps3av_get_mode);
/* get resolution by video_mode */
@@ -902,7 +899,6 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
*yres = video_mode_table[id].y;
return 0;
}
-
EXPORT_SYMBOL_GPL(ps3av_video_mode2res);
/* mute */
@@ -911,7 +907,6 @@ int ps3av_video_mute(int mute)
return ps3av_set_av_video_mute(mute ? PS3AV_CMD_MUTE_ON
: PS3AV_CMD_MUTE_OFF);
}
-
EXPORT_SYMBOL_GPL(ps3av_video_mute);
/* mute analog output only */
@@ -935,7 +930,6 @@ int ps3av_audio_mute(int mute)
return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON
: PS3AV_CMD_MUTE_OFF);
}
-
EXPORT_SYMBOL_GPL(ps3av_audio_mute);
static int __devinit ps3av_probe(struct ps3_system_bus_device *dev)
--
1.7.9.5
^ permalink raw reply related
* [PATCH 07/10] powerpc/ps3: Remove MEMORY_HOTPLUG requirement
From: Andre Heider @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: cbe-oss-dev, Andre Heider, linuxppc-dev
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
The dependency on hotplug memory was removed, so
remove the dependency in the Kconfig.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 4210aaa..b72425a 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -7,7 +7,6 @@ config PPC_PS3
select USB_OHCI_BIG_ENDIAN_MMIO
select USB_ARCH_HAS_EHCI
select USB_EHCI_BIG_ENDIAN_MMIO
- select MEMORY_HOTPLUG
select PPC_PCI_CHOICE
help
This option enables support for the Sony PS3 game console
--
1.7.9.5
^ permalink raw reply related
* [PATCH 03/10] powerpc/ps3: Add highmem repository write routines
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Add routines to allow Linux based bootloaders to create and/or
modify highmem region info in the PS3 system repository where
it can be retrived by later boot stages.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/platform.h | 9 ++++
arch/powerpc/platforms/ps3/repository.c | 74 +++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 1a633ed..4012a86 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -189,6 +189,15 @@ int ps3_repository_read_region_total(u64 *region_total);
int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
u64 *region_total);
+int ps3_repository_write_highmem_region_count(unsigned int region_count);
+int ps3_repository_write_highmem_base(unsigned int region_index,
+ u64 highmem_base);
+int ps3_repository_write_highmem_size(unsigned int region_index,
+ u64 highmem_size);
+int ps3_repository_write_highmem_info(unsigned int region_index,
+ u64 highmem_base, u64 highmem_size);
+int ps3_repository_delete_highmem_info(unsigned int region_index);
+
/* repository pme info */
int ps3_repository_read_num_be(unsigned int *num_be);
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index b31142c..c73f3a6 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -1058,6 +1058,80 @@ static int write_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2)
return 0;
}
+int ps3_repository_write_highmem_region_count(unsigned int region_count)
+{
+ int result;
+ u64 v1 = (u64)region_count;
+
+ result = write_node(
+ make_first_field("highmem", 0),
+ make_field("region", 0),
+ make_field("count", 0),
+ 0,
+ v1, 0);
+ return result;
+}
+
+int ps3_repository_write_highmem_base(unsigned int region_index,
+ u64 highmem_base)
+{
+ return write_node(
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("base", 0),
+ 0,
+ highmem_base, 0);
+}
+
+int ps3_repository_write_highmem_size(unsigned int region_index,
+ u64 highmem_size)
+{
+ return write_node(
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("size", 0),
+ 0,
+ highmem_size, 0);
+}
+
+int ps3_repository_write_highmem_info(unsigned int region_index,
+ u64 highmem_base, u64 highmem_size)
+{
+ int result;
+
+ result = ps3_repository_write_highmem_base(region_index, highmem_base);
+ return result ? result
+ : ps3_repository_write_highmem_size(region_index, highmem_size);
+}
+
+static int ps3_repository_delete_highmem_base(unsigned int region_index)
+{
+ return delete_node(
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("base", 0),
+ 0);
+}
+
+static int ps3_repository_delete_highmem_size(unsigned int region_index)
+{
+ return delete_node(
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("size", 0),
+ 0);
+}
+
+int ps3_repository_delete_highmem_info(unsigned int region_index)
+{
+ int result;
+
+ result = ps3_repository_delete_highmem_base(region_index);
+ result += ps3_repository_delete_highmem_size(region_index);
+
+ return result ? -1 : 0;
+}
+
#endif /* defined(CONFIG_PS3_WRITE_REPOSITORY) */
#if defined(DEBUG)
--
1.7.9.5
^ permalink raw reply related
* [PATCH 02/10] powerpc/ps3: Add PS3 repository write support
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Add a new config option CONFIG_PS3_REPOSITORY_WRITE that
conditionally builds in support to create, write and delete
nodes in the PS3 system repository.
This support will allow Linux based bootloaders to manage data
in the system repository for use by later boot stages,
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/Kconfig | 13 +++++++
arch/powerpc/platforms/ps3/repository.c | 58 +++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 476d9d9..4210aaa 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -88,6 +88,19 @@ config PS3_SYS_MANAGER
This support is required for system control. In
general, all users will say Y or M.
+config PS3_REPOSITORY_WRITE
+ bool "PS3 Repository write support" if PS3_ADVANCED
+ depends on PPC_PS3
+ default n
+ help
+ Enables support for writing to the PS3 System Repository.
+
+ This support is intended for bootloaders that need to store data
+ in the repository for later boot stages.
+
+ If in doubt, say N here and reduce the size of the kernel by a
+ small amount.
+
config PS3_STORAGE
depends on PPC_PS3
tristate
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 7bdfea3..b31142c 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -1002,6 +1002,64 @@ int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
lpar, rights);
}
+#if defined(CONFIG_PS3_REPOSITORY_WRITE)
+
+static int create_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2)
+{
+ int result;
+
+ dump_node(0, n1, n2, n3, n4, v1, v2);
+
+ result = lv1_create_repository_node(n1, n2, n3, n4, v1, v2);
+
+ if (result) {
+ pr_devel("%s:%d: lv1_create_repository_node failed: %s\n",
+ __func__, __LINE__, ps3_result(result));
+ return -ENOENT;
+ }
+
+ return 0;
+}
+
+static int delete_node(u64 n1, u64 n2, u64 n3, u64 n4)
+{
+ int result;
+
+ dump_node(0, n1, n2, n3, n4, 0, 0);
+
+ result = lv1_delete_repository_node(n1, n2, n3, n4);
+
+ if (result) {
+ pr_devel("%s:%d: lv1_delete_repository_node failed: %s\n",
+ __func__, __LINE__, ps3_result(result));
+ return -ENOENT;
+ }
+
+ return 0;
+}
+
+static int write_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2)
+{
+ int result;
+
+ result = create_node(n1, n2, n3, n4, v1, v2);
+
+ if (!result)
+ return 0;
+
+ result = lv1_write_repository_node(n1, n2, n3, n4, v1, v2);
+
+ if (result) {
+ pr_devel("%s:%d: lv1_write_repository_node failed: %s\n",
+ __func__, __LINE__, ps3_result(result));
+ return -ENOENT;
+ }
+
+ return 0;
+}
+
+#endif /* defined(CONFIG_PS3_WRITE_REPOSITORY) */
+
#if defined(DEBUG)
int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
--
1.7.9.5
^ permalink raw reply related
* [GIT PULL] PS3 updates for Linux-3.5
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, Hector Martin, Valentin Ilie,
Nathan Whitehorn, linuxppc-dev
Hi Ben,
I queued up the PS3 updates I have for v3.5. Please pull.
-Geoff
The following changes since commit 66f75a5d028beaf67c931435fdc3e7823125730c:
Linux 3.4-rc4 (2012-04-21 14:47:52 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-powerpc
for you to fetch changes up to 3252c8a3d0bf3c6af6ce7c76c40444943cda2943:
powerpc/ps3: Refresh ps3_defconfig (2012-04-24 18:18:01 -0700)
----------------------------------------------------------------
Andre Heider (3):
powerpc/ps3: Add highmem repository read routines
powerpc/ps3: Use highmem region from repository
powerpc/ps3: Remove MEMORY_HOTPLUG requirement
Geoff Levand (5):
powerpc/ps3: Correct lv1 repository routine names
powerpc/ps3: Add PS3 repository write support
powerpc/ps3: Add highmem repository write routines
powerpc/ps3: Minor Kconfig cleanup
powerpc/ps3: Refresh ps3_defconfig
Hector Martin (1):
powerpc/ps3: Add highmem region memory early
Valentin Ilie (1):
drivers/ps3: Fix checkpatch warnings in ps3av.c
arch/powerpc/configs/ps3_defconfig | 6 -
arch/powerpc/include/asm/lv1call.h | 4 +-
arch/powerpc/platforms/ps3/Kconfig | 22 +++-
arch/powerpc/platforms/ps3/mm.c | 77 ++++++------
arch/powerpc/platforms/ps3/platform.h | 16 +++
arch/powerpc/platforms/ps3/repository.c | 198 +++++++++++++++++++++++++++++++
drivers/ps3/ps3av.c | 24 ++--
7 files changed, 281 insertions(+), 66 deletions(-)
Andre Heider (3):
powerpc/ps3: Add highmem repository read routines
powerpc/ps3: Use highmem region from repository
powerpc/ps3: Remove MEMORY_HOTPLUG requirement
Geoff Levand (5):
powerpc/ps3: Correct lv1 repository routine names
powerpc/ps3: Add PS3 repository write support
powerpc/ps3: Add highmem repository write routines
powerpc/ps3: Minor Kconfig cleanup
powerpc/ps3: Refresh ps3_defconfig
Hector Martin (1):
powerpc/ps3: Add highmem region memory early
Valentin Ilie (1):
drivers/ps3: Fix checkpatch warnings in ps3av.c
arch/powerpc/configs/ps3_defconfig | 6 -
arch/powerpc/include/asm/lv1call.h | 4 +-
arch/powerpc/platforms/ps3/Kconfig | 22 +++-
arch/powerpc/platforms/ps3/mm.c | 77 ++++++------
arch/powerpc/platforms/ps3/platform.h | 16 +++
arch/powerpc/platforms/ps3/repository.c | 198 +++++++++++++++++++++++++++++++
drivers/ps3/ps3av.c | 24 ++--
7 files changed, 281 insertions(+), 66 deletions(-)
--
1.7.9.5
^ permalink raw reply
* [PATCH 06/10] powerpc/ps3: Add highmem region memory early
From: Hector Martin @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn,
Hector Martin
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Real mode memory can be limited and runs out quickly as memory is allocated
during kernel startup. Having the highmem available sooner fixes this.
This change simplifies the memory management code by converting from hotplug
memory to logical memory blocks.
Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/mm.c | 66 ++++++---------------------------------
1 file changed, 10 insertions(+), 56 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 05a2bcb..0c9f643 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/export.h>
-#include <linux/memory_hotplug.h>
#include <linux/memblock.h>
#include <linux/slab.h>
@@ -98,7 +97,7 @@ struct mem_region {
* The HV virtual address space (vas) allows for hotplug memory regions.
* Memory regions can be created and destroyed in the vas at runtime.
* @rm: real mode (bootmem) region
- * @r1: hotplug memory region(s)
+ * @r1: highmem region(s)
*
* ps3 addresses
* virt_addr: a cpu 'translated' effective address
@@ -224,10 +223,6 @@ void ps3_mm_vas_destroy(void)
}
}
-/*============================================================================*/
-/* memory hotplug routines */
-/*============================================================================*/
-
/**
* ps3_mm_region_create - create a memory region in the vas
* @r: pointer to a struct mem_region to accept initialized values
@@ -328,56 +323,6 @@ zero_region:
return result;
}
-/**
- * ps3_mm_add_memory - hot add memory
- */
-
-static int __init ps3_mm_add_memory(void)
-{
- int result;
- unsigned long start_addr;
- unsigned long start_pfn;
- unsigned long nr_pages;
-
- if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
- return -ENODEV;
-
- BUG_ON(!mem_init_done);
-
- if (!map.r1.size) {
- DBG("%s:%d: No region 1, not adding memory\n",
- __func__, __LINE__);
- return 0;
- }
-
- start_addr = map.rm.size;
- start_pfn = start_addr >> PAGE_SHIFT;
- nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
- DBG("%s:%d: start_addr %lxh, start_pfn %lxh, nr_pages %lxh\n",
- __func__, __LINE__, start_addr, start_pfn, nr_pages);
-
- result = add_memory(0, start_addr, map.r1.size);
-
- if (result) {
- pr_err("%s:%d: add_memory failed: (%d)\n",
- __func__, __LINE__, result);
- return result;
- }
-
- memblock_add(start_addr, map.r1.size);
-
- result = online_pages(start_pfn, nr_pages);
-
- if (result)
- pr_err("%s:%d: online_pages failed: (%d)\n",
- __func__, __LINE__, result);
-
- return result;
-}
-
-device_initcall(ps3_mm_add_memory);
-
/*============================================================================*/
/* dma routines */
/*============================================================================*/
@@ -1271,6 +1216,15 @@ void __init ps3_mm_init(void)
/* correct map.total for the real total amount of memory we use */
map.total = map.rm.size + map.r1.size;
+ if (!map.r1.size) {
+ DBG("%s:%d: No highmem region found\n", __func__, __LINE__);
+ } else {
+ DBG("%s:%d: Adding highmem region: %llxh %llxh\n",
+ __func__, __LINE__, map.rm.size,
+ map.total - map.rm.size);
+ memblock_add(map.rm.size, map.total - map.rm.size);
+ }
+
DBG(" <- %s:%d\n", __func__, __LINE__);
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH 04/10] powerpc/ps3: Add highmem repository read routines
From: Andre Heider @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Add repository helper routines to read highmem region info.
Bootloaders that preallocate highmem regions must place the
region info into the repository at these well known nodes.
These routines allow second stage kernles to read the region
info from those nodes.
Signed-off-by: Andre Heider <a.heider@gmail.com>
CC: Nathan Whitehorn <nwhitehorn@freebsd.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/platform.h | 7 ++++
arch/powerpc/platforms/ps3/repository.c | 66 +++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 4012a86..d71329a 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -188,6 +188,13 @@ int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
int ps3_repository_read_region_total(u64 *region_total);
int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
u64 *region_total);
+int ps3_repository_read_highmem_region_count(unsigned int *region_count);
+int ps3_repository_read_highmem_base(unsigned int region_index,
+ u64 *highmem_base);
+int ps3_repository_read_highmem_size(unsigned int region_index,
+ u64 *highmem_size);
+int ps3_repository_read_highmem_info(unsigned int region_index,
+ u64 *highmem_base, u64 *highmem_size);
int ps3_repository_write_highmem_region_count(unsigned int region_count);
int ps3_repository_write_highmem_base(unsigned int region_index,
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index c73f3a6..9b47ba7 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -779,6 +779,72 @@ int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size, u64 *region_total)
}
/**
+ * ps3_repository_read_highmem_region_count - Read the number of highmem regions
+ *
+ * Bootloaders must arrange the repository nodes such that regions are indexed
+ * with a region_index from 0 to region_count-1.
+ */
+
+int ps3_repository_read_highmem_region_count(unsigned int *region_count)
+{
+ int result;
+ u64 v1 = 0;
+
+ result = read_node(PS3_LPAR_ID_CURRENT,
+ make_first_field("highmem", 0),
+ make_field("region", 0),
+ make_field("count", 0),
+ 0,
+ &v1, NULL);
+ *region_count = v1;
+ return result;
+}
+
+
+int ps3_repository_read_highmem_base(unsigned int region_index,
+ u64 *highmem_base)
+{
+ return read_node(PS3_LPAR_ID_CURRENT,
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("base", 0),
+ 0,
+ highmem_base, NULL);
+}
+
+int ps3_repository_read_highmem_size(unsigned int region_index,
+ u64 *highmem_size)
+{
+ return read_node(PS3_LPAR_ID_CURRENT,
+ make_first_field("highmem", 0),
+ make_field("region", region_index),
+ make_field("size", 0),
+ 0,
+ highmem_size, NULL);
+}
+
+/**
+ * ps3_repository_read_highmem_info - Read high memory region info
+ * @region_index: Region index, {0,..,region_count-1}.
+ * @highmem_base: High memory base address.
+ * @highmem_size: High memory size.
+ *
+ * Bootloaders that preallocate highmem regions must place the
+ * region info into the repository at these well known nodes.
+ */
+
+int ps3_repository_read_highmem_info(unsigned int region_index,
+ u64 *highmem_base, u64 *highmem_size)
+{
+ int result;
+
+ *highmem_base = 0;
+ result = ps3_repository_read_highmem_base(region_index, highmem_base);
+ return result ? result
+ : ps3_repository_read_highmem_size(region_index, highmem_size);
+}
+
+/**
* ps3_repository_read_num_spu_reserved - Number of physical spus reserved.
* @num_spu: Number of physical spus.
*/
--
1.7.9.5
^ permalink raw reply related
* [PATCH 01/10] powerpc/ps3: Correct lv1 repository routine names
From: Geoff Levand @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Rename these repo routines:
modify_repository_node_value => write_repository_node
remove_repository_node => delete_repository_node
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/include/asm/lv1call.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/lv1call.h b/arch/powerpc/include/asm/lv1call.h
index 233f9ec..f511767 100644
--- a/arch/powerpc/include/asm/lv1call.h
+++ b/arch/powerpc/include/asm/lv1call.h
@@ -265,8 +265,8 @@ LV1_CALL(get_spe_irq_outlet, 2, 1, 78 )
LV1_CALL(set_spe_privilege_state_area_1_register, 3, 0, 79 )
LV1_CALL(create_repository_node, 6, 0, 90 )
LV1_CALL(read_repository_node, 5, 2, 91 )
-LV1_CALL(modify_repository_node_value, 6, 0, 92 )
-LV1_CALL(remove_repository_node, 4, 0, 93 )
+LV1_CALL(write_repository_node, 6, 0, 92 )
+LV1_CALL(delete_repository_node, 4, 0, 93 )
LV1_CALL(read_htab_entries, 2, 5, 95 )
LV1_CALL(set_dabr, 2, 0, 96 )
LV1_CALL(get_total_execution_time, 2, 1, 103 )
--
1.7.9.5
^ permalink raw reply related
* [PATCH 05/10] powerpc/ps3: Use highmem region from repository
From: Andre Heider @ 2012-04-25 19:19 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: cbe-oss-dev, Andre Heider, linuxppc-dev, Nathan Whitehorn,
Hector Martin
In-Reply-To: <cover.1335379330.git.geoff@infradead.org>
Use any preallocated highmem region setup by the bootloader.
This implementation only checks for the existance of a single
region at region_index=0.
This feature allows the bootloader to preallocate highmem
regions and pass the region locations to the kernel through
the repository. Preallocated regions can be used to hold the
initrd or other large data. If no region info exists, the
kernel retains the old behavior and attempts to allocate the
highmem region itself.
Based on Hector Martin's patch "Get lv1 high memory region from
devtree".
CC: Hector Martin <hector@marcansoft.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
CC: Nathan Whitehorn <nwhitehorn@freebsd.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/mm.c | 51 +++++++++++++++++++++++++++++++++++++--
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index de2aea4..05a2bcb 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -79,12 +79,14 @@ enum {
* @base: base address
* @size: size in bytes
* @offset: difference between base and rm.size
+ * @destroy: flag if region should be destroyed upon shutdown
*/
struct mem_region {
u64 base;
u64 size;
unsigned long offset;
+ int destroy;
};
/**
@@ -262,6 +264,7 @@ static int ps3_mm_region_create(struct mem_region *r, unsigned long size)
goto zero_region;
}
+ r->destroy = 1;
r->offset = r->base - map.rm.size;
return result;
@@ -279,7 +282,14 @@ static void ps3_mm_region_destroy(struct mem_region *r)
{
int result;
+ if (!r->destroy) {
+ pr_info("%s:%d: Not destroying high region: %llxh %llxh\n",
+ __func__, __LINE__, r->base, r->size);
+ return;
+ }
+
DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base);
+
if (r->base) {
result = lv1_release_memory(r->base);
BUG_ON(result);
@@ -288,6 +298,36 @@ static void ps3_mm_region_destroy(struct mem_region *r)
}
}
+static int ps3_mm_get_repository_highmem(struct mem_region *r)
+{
+ int result;
+
+ /* Assume a single highmem region. */
+
+ result = ps3_repository_read_highmem_info(0, &r->base, &r->size);
+
+ if (result)
+ goto zero_region;
+
+ if (!r->base || !r->size) {
+ result = -1;
+ goto zero_region;
+ }
+
+ r->offset = r->base - map.rm.size;
+
+ DBG("%s:%d: Found high region in repository: %llxh %llxh\n",
+ __func__, __LINE__, r->base, r->size);
+
+ return 0;
+
+zero_region:
+ DBG("%s:%d: No high region in repository.\n", __func__, __LINE__);
+
+ r->size = r->base = r->offset = 0;
+ return result;
+}
+
/**
* ps3_mm_add_memory - hot add memory
*/
@@ -304,6 +344,12 @@ static int __init ps3_mm_add_memory(void)
BUG_ON(!mem_init_done);
+ if (!map.r1.size) {
+ DBG("%s:%d: No region 1, not adding memory\n",
+ __func__, __LINE__);
+ return 0;
+ }
+
start_addr = map.rm.size;
start_pfn = start_addr >> PAGE_SHIFT;
nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -1217,9 +1263,10 @@ void __init ps3_mm_init(void)
BUG_ON(map.rm.base);
BUG_ON(!map.rm.size);
+ /* Check if we got the highmem region from an earlier boot step */
- /* arrange to do this in ps3_mm_add_memory */
- ps3_mm_region_create(&map.r1, map.total - map.rm.size);
+ if (ps3_mm_get_repository_highmem(&map.r1))
+ ps3_mm_region_create(&map.r1, map.total - map.rm.size);
/* correct map.total for the real total amount of memory we use */
map.total = map.rm.size + map.r1.size;
--
1.7.9.5
^ permalink raw reply related
* Re: Regression in 32-bit ppc kernel
From: Larry Finger @ 2012-04-25 15:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras, LKML
In-Reply-To: <1335327081.21961.28.camel@pasglop>
On 04/24/2012 11:11 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2012-04-24 at 21:37 -0500, Larry Finger wrote:
>>>> Somewhere between v3.2 and v3.3, the kernel in my Powerbook G4
>> started issuing
>>>> the following traceback on bootup:
>>>
>>> Does it continue working afterward or not at all ?
>>>
>>> Are you using the old IDE driver or the newer libata based
>> pata_macio ?
>>
>> Yes, it finishes the boot, and appears to work correctly. If a device
>> is
>> missing, I do not know what it is.
>>
>> I think I am using the old IDE driver.
>>
> Interesting. Does it make a difference if you switch to pata_macio ?
After a few tries, I managed to change over to pata_macio. Fortunately, most of
the system used dev-by-id or UUID, thus most of the process was getting all the
kernel pieces built in.
Unfortunately, the original problem remains. I have resumed the bisecting - only
11 steps to go. I should have it by Friday! :)
Larry
^ permalink raw reply
* Re: [PATCH 0/2] Kdump support for 47x
From: Josh Boyer @ 2012-04-25 13:07 UTC (permalink / raw)
To: Suzuki K. Poulose; +Cc: linuxppc-dev
In-Reply-To: <4F97C243.80806@in.ibm.com>
On Wed, Apr 25, 2012 at 5:22 AM, Suzuki K. Poulose <suzuki@in.ibm.com> wrot=
e:
> On 04/16/2012 01:56 PM, Suzuki K. Poulose wrote:
>>
>> The following series implements Kexec/Kdump support for
>> PPC_47x based platforms. Doesn't support SMP yet.
>>
>> I have tested these patches on the following simulators:
>> =A0 =A0 =A0 =A0 1) simics
>> =A0 =A0 =A0 =A0 2) IBM ISS for ppc476.
>>
>> Changes since V1:
>> =A0* Initialize the SPRN_PID to kernel pid (0) before the TLB operations=
in
>> =A0 =A0setup_map_47x
>>
>>
>
> Josh,
>
> Did you get a chance to look at this ?
Not yet. I'll try to get to this and some other patches APM submitted
before the end of the week. Apologies for the delay.
josh
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Andreas Schwab @ 2012-04-25 10:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: khali, linuxppc-dev
In-Reply-To: <1335343125.21961.33.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> Also, does the new driver properly react to load ?
The old driver keeps the cpu fans running at 300 rpm (lowest speed?)
for much longer when the cpus are put busy. Only when the cpus are back
idle it speeds them up to 1200 rpm or more for some time depending on
how long the cpus were busy. The new driver is faster at speeding up
the fans to around 800 rpm when cpus get busy, and keeps them running
longer at that speed, but doesn't appear to select much higher speeds.
The old driver appears to be better suited to desktops, whereas the new
driver is probably better for servers.
But the most annoying sound appears to be coming from the slots fan.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: [PATCH 0/2] Kdump support for 47x
From: Suzuki K. Poulose @ 2012-04-25 9:22 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20120416082449.27331.12488.stgit@suzukikp.in.ibm.com>
On 04/16/2012 01:56 PM, Suzuki K. Poulose wrote:
> The following series implements Kexec/Kdump support for
> PPC_47x based platforms. Doesn't support SMP yet.
>
> I have tested these patches on the following simulators:
> 1) simics
> 2) IBM ISS for ppc476.
>
> Changes since V1:
> * Initialize the SPRN_PID to kernel pid (0) before the TLB operations in
> setup_map_47x
>
>
Josh,
Did you get a chance to look at this ?
Thanks
Suzuki
> ---
>
> Suzuki K. Poulose (2):
> [47x] Enable CRASH_DUMP
> [47x] Kernel support for KEXEC
>
>
> arch/powerpc/Kconfig | 4 -
> arch/powerpc/kernel/misc_32.S | 195 ++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 191 insertions(+), 8 deletions(-)
>
^ permalink raw reply
* Re: [PATCH 00/15] PowerMac i2c API conversions & windfarm updates
From: Benjamin Herrenschmidt @ 2012-04-25 8:38 UTC (permalink / raw)
To: Andreas Schwab; +Cc: khali, linuxppc-dev
In-Reply-To: <m2397sz1er.fsf@igel.home>
On Wed, 2012-04-25 at 10:00 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > The biggest change is that windfarm is ported to generally use
> > the new model, and I've written a new set of windfarm modules to
> > take over from the old therm_pm72 (which was mostly unfixable)
> > on the PowerMac G5 AGP and Xserve G5 machines.
>
> I have the impression that the new driver keeps the fans running faster
> all the time.
There's a few things you can try. Both drivers put the various values &
speeds in sysfs, tho in different places. You can do a test such as
overnight idle or something like that and compare the averages.
Also, does the new driver properly react to load ?
The algorithm should be identical and the factors fed to it as well, but
there's always the possibility that I screwed up something.
Cheers,
Ben.
^ permalink raw reply
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