Re: [PATCH] powerpc, scc: duplicate SCC_UHC_USBCEN
Roel, untested, is it correct? Your patch is correct. Thanks for your pointing it out and sending the patch. I tested your patch and it works good. Fortunately, this bug is not fatal because it seems that the SCC-UHC sets SCC_UHC_USBEN and SCC_UHC_USBCEN at once. Your patch does not contain 'Signed-off-by' line. Could you re-post it with your sign? --- arch/powerpc/platforms/cell/celleb_scc.h:224: #define SCC_UHC_USBEN 0x0001 #define SCC_UHC_USBCEN 0x0002 --- diff --git a/arch/powerpc/platforms/cell/celleb_scc_uhc.c b/arch/powerpc/platforms/cell/celleb_scc_uhc.c index d63b720..b086f33 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_uhc.c +++ b/arch/powerpc/platforms/cell/celleb_scc_uhc.c @@ -31,7 +31,7 @@ static inline int uhc_clkctrl_ready(u32 val) { - const u32 mask = SCC_UHC_USBCEN | SCC_UHC_USBCEN; + const u32 mask = SCC_UHC_USBCEN | SCC_UHC_USBEN; return((val mask) == mask); } ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev Best regards, Kou Ishizaki ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] cell: fix section mismatch warnings
Fix following warnings: WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0x9c): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.iowa_register_bus() WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0xa4): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.io_workaround_init() Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/io-workarounds.c |6 +++--- arch/powerpc/platforms/cell/io-workarounds.h |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c index 3b84e8b..b5f84e8 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.c +++ b/arch/powerpc/platforms/cell/io-workarounds.c @@ -118,7 +118,7 @@ static void iowa_##name at \ #undef DEF_PCI_AC_RET #undef DEF_PCI_AC_NORET -static struct ppc_pci_io __initdata iowa_pci_io = { +static const struct ppc_pci_io __devinitconst iowa_pci_io = { #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, #define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, @@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(unsigned long addr, unsigned long size, } /* Regist new bus to support workaround */ -void __init iowa_register_bus(struct pci_controller *phb, +void __devinit iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops, int (*initfunc)(struct iowa_bus *, void *), void *data) { @@ -173,7 +173,7 @@ void __init iowa_register_bus(struct pci_controller *phb, } /* enable IO workaround */ -void __init io_workaround_init(void) +void __devinit io_workaround_init(void) { static int io_workaround_inited; diff --git a/arch/powerpc/platforms/cell/io-workarounds.h b/arch/powerpc/platforms/cell/io-workarounds.h index 79d8ed3..6efc778 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.h +++ b/arch/powerpc/platforms/cell/io-workarounds.h @@ -31,9 +31,9 @@ struct iowa_bus { void *private; }; -void __init io_workaround_init(void); -void __init iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, - int (*)(struct iowa_bus *, void *), void *); +void __devinit io_workaround_init(void); +void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, +int (*)(struct iowa_bus *, void *), void *); struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); struct iowa_bus *iowa_pio_find_bus(unsigned long); -- 1.5.4.1 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 8/9] celleb: move miscellaneous files for Beat
This patch moves miscellaneous files for Beat into platforms/cell/. All files in this patch are used by celleb-beat only. Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] --- arch/powerpc/platforms/Makefile |1 arch/powerpc/platforms/cell/Makefile |6 arch/powerpc/platforms/cell/beat.c | 264 + arch/powerpc/platforms/cell/beat.h | 39 +++ arch/powerpc/platforms/cell/beat_interrupt.c | 283 +++ arch/powerpc/platforms/cell/beat_interrupt.h | 33 +++ arch/powerpc/platforms/cell/beat_smp.c | 124 +++ arch/powerpc/platforms/cell/beat_udbg.c | 98 + arch/powerpc/platforms/cell/celleb_setup.c |4 arch/powerpc/platforms/celleb/Makefile |5 arch/powerpc/platforms/celleb/beat.c | 264 - arch/powerpc/platforms/celleb/beat.h | 39 --- arch/powerpc/platforms/celleb/interrupt.c| 283 --- arch/powerpc/platforms/celleb/interrupt.h| 33 --- arch/powerpc/platforms/celleb/smp.c | 124 --- arch/powerpc/platforms/celleb/udbg_beat.c| 98 - 16 files changed, 847 insertions(+), 851 deletions(-) Index: b/arch/powerpc/platforms/cell/beat.c === --- /dev/null 1970-01-01 00:00:00.0 + +++ b/arch/powerpc/platforms/cell/beat.c2008-04-23 21:38:50.0 +0900 @@ -0,0 +1,264 @@ +/* + * Simple routines for Celleb/Beat + * + * (C) Copyright 2006-2007 TOSHIBA CORPORATION + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include linux/module.h +#include linux/init.h +#include linux/err.h +#include linux/rtc.h +#include linux/interrupt.h +#include linux/irqreturn.h +#include linux/reboot.h + +#include asm/hvconsole.h +#include asm/time.h +#include asm/machdep.h +#include asm/firmware.h + +#include beat_wrapper.h +#include beat.h +#include beat_interrupt.h + +static int beat_pm_poweroff_flag; + +void beat_restart(char *cmd) +{ + beat_shutdown_logical_partition(!beat_pm_poweroff_flag); +} + +void beat_power_off(void) +{ + beat_shutdown_logical_partition(0); +} + +u64 beat_halt_code = 0x1000UL; +EXPORT_SYMBOL(beat_halt_code); + +void beat_halt(void) +{ + beat_shutdown_logical_partition(beat_halt_code); +} + +int beat_set_rtc_time(struct rtc_time *rtc_time) +{ + u64 tim; + tim = mktime(rtc_time-tm_year+1900, +rtc_time-tm_mon+1, rtc_time-tm_mday, +rtc_time-tm_hour, rtc_time-tm_min, rtc_time-tm_sec); + if (beat_rtc_write(tim)) + return -1; + return 0; +} + +void beat_get_rtc_time(struct rtc_time *rtc_time) +{ + u64 tim; + + if (beat_rtc_read(tim)) + tim = 0; + to_tm(tim, rtc_time); + rtc_time-tm_year -= 1900; + rtc_time-tm_mon -= 1; +} + +#defineBEAT_NVRAM_SIZE 4096 + +ssize_t beat_nvram_read(char *buf, size_t count, loff_t *index) +{ + unsigned int i; + unsigned long len; + char *p = buf; + + if (*index = BEAT_NVRAM_SIZE) + return -ENODEV; + i = *index; + if (i + count BEAT_NVRAM_SIZE) + count = BEAT_NVRAM_SIZE - i; + + for (; count != 0; count -= len) { + len = count; + if (len BEAT_NVRW_CNT) + len = BEAT_NVRW_CNT; + if (beat_eeprom_read(i, len, p)) + return -EIO; + + p += len; + i += len; + } + *index = i; + return p - buf; +} + +ssize_t beat_nvram_write(char *buf, size_t count, loff_t *index) +{ + unsigned int i; + unsigned long len; + char *p = buf; + + if (*index = BEAT_NVRAM_SIZE) + return -ENODEV; + i = *index; + if (i + count BEAT_NVRAM_SIZE) + count = BEAT_NVRAM_SIZE - i; + + for (; count != 0; count -= len) { + len = count; + if (len BEAT_NVRW_CNT) + len = BEAT_NVRW_CNT; + if (beat_eeprom_write(i, len, p)) + return -EIO; + + p += len
Re: [PATCH 1/7] PowerPC64: Not to insert EA=0 entry at
initializing SLB In-Reply-To: [EMAIL PROTECTED] From: Ishizaki Kou [EMAIL PROTECTED] X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Wednesday 26 September 2007, Ishizaki Kou wrote: This is a workaround NOT to insert EA=0 entry at initializing SLB. Without this patch, you can see /sbin/init hanging at a machine which has less or equal than 256MB memory. Can you elaborate? I don't understand why /sbin/init will hang because of an incorrect SLB entry, or how that entry gets initialized from get_paca()-kstack. For latter question, following scenario will occur: mm/slb.c:slb_flush_and_rebolt() function rebolts SLB entry 1 and 2 by VMALLOC segment and kernel stack segment respectively, but if we have get_paca()-kstack is set to zero, following condition will be false, 105: if ((ksp_esid_data ESID_MASK) == PAGE_OFFSET) { so following line will create shadowed bolted SLB entry 2 with EA=0 111: slb_shadow_update(get_paca()-kstack, lflags, 2); and following lines will create real bolted SLB entry 2. 125: r(mk_vsid_data(ksp_esid_data, lflags), 126: r(ksp_esid_data) Celleb does not set get_paca()-kstack properly (I don't know which function should set it up), so we need to workaround. If we have more than 256MB, SLB entry 2 will be overridden with second segment of the main storage, so the problem will be washed out. For former question, bolted SLB entries should not be erased even if /sbin/init is exec()'ed. Our /sbin/init starts at 0x0100, at Segment=0. So SLB entry 2 matches. And the processor fetches instructions from the kernel, not /sbin/init. Do above expressions make sense? Are you still trying to find a better fix for 2.6.24, or do you intend to have this patch go in for now? I believe setting get_paca()-kstack properly will solve this problem. Do you have any idea? Also, I did not get a patch 4/7 and 5/7. Did you send them to some other mailing list, or did they get lost on the way? I don't have them too. It seems that they are lost. I resent them. Best regards, Kou Ishizaki ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev