* [patch 13/13] spufs: initialize context correctly
From: Arnd Bergmann @ 2006-03-22 23:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060323203423.620978000@dyn-9-152-242-103.boeblingen.de.ibm.com>
the mfc member of a new context was not initialized to zero,
which potentially leads to wild memory accesses.
From: Dirk Herrendoerfer <herrendo@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6.16-rc/arch/powerpc/platforms/cell/spufs/context.c
===================================================================
--- linux-2.6.16-rc.orig/arch/powerpc/platforms/cell/spufs/context.c
+++ linux-2.6.16-rc/arch/powerpc/platforms/cell/spufs/context.c
@@ -51,6 +51,7 @@ struct spu_context *alloc_spu_context(vo
ctx->ibox_fasync = NULL;
ctx->wbox_fasync = NULL;
ctx->mfc_fasync = NULL;
+ ctx->mfc = NULL;
ctx->tagwait = 0;
ctx->state = SPU_STATE_SAVED;
ctx->local_store = NULL;
--
^ permalink raw reply
* [PATCH] kdump: Fix for machine checkstop on DMA fault
From: Haren Myneni @ 2006-03-23 4:30 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, ellerman, Milton Miller, Olaf Hering
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
Paul, If you are OK with this fix, please send it upstream.
Thanks
Haren
- Some machines checkstop on dma protection fault for ongoing DMA left
in the first kernel. Since, we do not shutdown devices before the kdump
boot, let them continue DMA to old kernel space.
Signed-off-by: Haren Myneni <haren@us.ibm.com>
[-- Attachment #2: kdump-dma-fault-fix.patch --]
[-- Type: text/x-patch, Size: 557 bytes --]
--- 2616-git5-k1/arch/powerpc/kernel/iommu.c.orig 2006-04-04 19:08:02.000000000 -0700
+++ 2616-git5-k1/arch/powerpc/kernel/iommu.c 2006-04-04 10:50:45.000000000 -0700
@@ -427,8 +427,10 @@ struct iommu_table *iommu_init_table(str
tbl->it_largehint = tbl->it_halfpoint;
spin_lock_init(&tbl->it_lock);
+#ifndef CONFIG_CRASH_DUMP
/* Clear the hardware table in case firmware left allocations in it */
ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
+#endif
if (!welcomed) {
printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
^ permalink raw reply
* please pull powerpc.git
From: Paul Mackerras @ 2006-03-23 4:42 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do a pull from
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
(note: not powerpc-merge.git) to get the PowerPC updates that have
been queued up to go into 2.6.17. I have added 8 more commits since
the last pull request.
The changes to kernel/auditsc.c and lib/extable.c are purely comment
changes.
Thanks,
Paul.
Adrian Cox:
ppc: Fix platform_notify functions marked __init
Andrew Morton:
powerpc: Fix warning in add_memory
powerpc: via-pmu warning fix
Andy Fleming:
powerpc: Add PCI support for 8540 ADS to powerpc tree
Anton Blanchard:
powerpc: dont allow old RTC to be selected
Becky Bruce:
powerpc: Updated Initial MPC8540 ADS port with OF Flat Dev
powerpc: Fix Kernel FP unavail exception for BookE
powerpc: mpc85xx_ads.c include file cleanup
powerpc: rename mpc85xx.c to misc.c
powerpc: lindent 85xx platform code
powerpc/ppc: Add missing isyncs in head_fsl_booke.S
Bjorn Helgaas:
powerpc: tidy-up of_register_driver()/driver_register() return values
macintosh: tidy-up driver_register() return values
Christoph Hellwig:
powerpc: add for_each_node_by_foo helpers
spidernet: select FW_LOADER
David Gibson:
powerpc: Fixup for STRICT_MM_TYPECHECKS
powerpc: Better pmd_bad() and pud_bad() checks
Domen Puncer:
powerpc: Remove arch/ppc/syslib/ppc4xx_pm.c
Eric Sesterhenn:
kzalloc() conversion in arch/ppc
Geoff Levand:
powerpc: Add missing vmlinux.bin target
Grant C. Likely:
powerpc: Move xparameters.h into xilinx virtex device specific path
powerpc: Make Virtex-II Pro support generic for all Virtex devices
powerpc: Migrate Xilinx Vertex support from the OCP bus to the platfom bus.
powerpc: Migrate ML300 reference design to the platform bus
powerpc: Add ML300 defconfig
powerpc: Add Virtex-4 FX to cpu table
powerpc: Add xparameters file for Xilinx ML403 reference design
powerpc: Add support for Xilinx ML403 reference design
powerpc: Add ML403 defconfig
Grant Likely:
Fix compile error for ML300/403
Horst Kronstorfer:
ppc32: Fix BCSR_SIZE for MPC834x SYS
Jean Delvare:
macintosh: cleanup the use of i2c headers
Jon Mason:
powerpc: trivial: modify comments to refer to new location of files
Kim Phillips:
powerpc: Add FSL SEC node to documentation
Kumar Gala:
powerpc: Add CONFIG_DEFAULT_UIMAGE to build a uImage by default for a board
powerpc: cleaned up fsl_soc.c
powerpc: Add platform support for MPC834x USB controllers
powerpc: Cleanup MPC83xx platform support
powerpc: Lindent platforms/83xx
powerpc: Fix mpc83xx restart bug
Marcelo Tosatti:
powerpc: generalize PPC44x_PIN_SIZE
Michael Ellerman:
powerpc: Always panic if lmb_alloc() fails
powerpc: Move LMB_ALLOC_ANYWHERE out of lmb.h
powerpc: Put parameter names in lmb.h prototypes
powerpc: Clean up pSeries firmware feature initialisation
powerpc: Move pSeries firmware feature setup into platforms/pseries
powerpc: Fix bug in bug fix for bug in lmb_alloc()
powerpc: Unconfuse htab_bolt_mapping() callers
powerpc: Remove unused iommu_off logic from pSeries_init_early()
powerpc: trivial: Cleanup whitespace in cputable.h
powerpc: Replace platform_is_lpar() with a firmware feature
powerpc: iseries: mf related cleanups
powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
powerpc: iseries: Add /system-id, /model and /compatible
powerpc: iseries: Add bootargs to /chosen
powerpc: Remove calculation of io hole
Nathan Lynch:
powerpc numa: fix boot_cpuid always assigned to node 0
powerpc numa: Minor debugging code changes
powerpc numa: Minor cpu hotplug-related cleanups
powerpc numa: Get rid of "numa domain" terminology
powerpc numa: Consolidate handling of Power4 special case
powerpc numa: Support sparse online node map
powerpc numa: Consolidate assignment of cpus to nodes
Nick Piggin:
powerpc: newline for ISYNC_ON_SMP
powerpc: native atomic_add_unless
Olaf Hering:
powerpc: cleanup pmac_newworld variable usage
powerpc: remove check for ELF offset in powerpc bootimage
powerpc: add a raw dump command to xmon
powerpc: make powerbook_sleep_grackle static
Paul Mackerras:
powerpc: Implement accurate task and CPU time accounting
powerpc: Export variables used in conversions to/from cputime_t
Stephen Rothwell:
powerpc: update mailing list addresses
Vitaly Bordug:
ppc32 8xx: Added setbitsXX/clrbitsXX macro for read-modify-write operations
PPC32 8xx: support for the physmapped flash on m8xx
ppc32: MPC885ADS, MPC866ADS and MPC8272ADS-specific platform stuff for fs_enet
ppc32: Make platform devices being able to assign functions
Documentation/powerpc/booting-without-of.txt | 72 ++
Documentation/powerpc/eeh-pci-error-recovery.txt | 15
Documentation/powerpc/hvcs.txt | 4
MAINTAINERS | 4
arch/powerpc/Kconfig | 38 +
arch/powerpc/Makefile | 2
arch/powerpc/boot/install.sh | 2
arch/powerpc/boot/main.c | 4
arch/powerpc/configs/mpc8540_ads_defconfig | 721 +++++++++++++++++++
arch/powerpc/kernel/asm-offsets.c | 3
arch/powerpc/kernel/cputable.c | 12
arch/powerpc/kernel/entry_64.S | 11
arch/powerpc/kernel/firmware.c | 25 -
arch/powerpc/kernel/head_44x.S | 2
arch/powerpc/kernel/head_64.S | 11
arch/powerpc/kernel/head_8xx.S | 2
arch/powerpc/kernel/head_booke.h | 363 ++++++++++
arch/powerpc/kernel/head_fsl_booke.S | 6
arch/powerpc/kernel/iomap.c | 2
arch/powerpc/kernel/iommu.c | 1
arch/powerpc/kernel/irq.c | 32 +
arch/powerpc/kernel/kprobes.c | 1
arch/powerpc/kernel/of_device.c | 5
arch/powerpc/kernel/pci_iommu.c | 1
arch/powerpc/kernel/ppc_ksyms.c | 1
arch/powerpc/kernel/process.c | 9
arch/powerpc/kernel/prom.c | 4
arch/powerpc/kernel/ptrace-common.h | 2
arch/powerpc/kernel/rtas-proc.c | 1
arch/powerpc/kernel/rtas_pci.c | 2
arch/powerpc/kernel/setup_64.c | 2
arch/powerpc/kernel/signal_64.c | 2
arch/powerpc/kernel/smp.c | 4
arch/powerpc/kernel/time.c | 241 ++++++-
arch/powerpc/kernel/vdso.c | 2
arch/powerpc/lib/copypage_64.S | 2
arch/powerpc/lib/copyuser_64.S | 2
arch/powerpc/lib/e2a.c | 14
arch/powerpc/lib/memcpy_64.S | 2
arch/powerpc/lib/rheap.c | 2
arch/powerpc/mm/fault.c | 2
arch/powerpc/mm/hash_low_32.S | 2
arch/powerpc/mm/hash_utils_64.c | 32 -
arch/powerpc/mm/init_64.c | 48 -
arch/powerpc/mm/lmb.c | 16
arch/powerpc/mm/mem.c | 3
arch/powerpc/mm/mmap.c | 2
arch/powerpc/mm/numa.c | 160 ++--
arch/powerpc/mm/slb_low.S | 2
arch/powerpc/mm/stab.c | 4
arch/powerpc/mm/tlb_64.c | 2
arch/powerpc/oprofile/op_model_power4.c | 3
arch/powerpc/platforms/83xx/Makefile | 4
arch/powerpc/platforms/83xx/misc.c | 55 +
arch/powerpc/platforms/83xx/mpc834x_sys.c | 89 --
arch/powerpc/platforms/83xx/mpc834x_sys.h | 2
arch/powerpc/platforms/83xx/mpc83xx.h | 5
arch/powerpc/platforms/83xx/pci.c | 21 -
arch/powerpc/platforms/85xx/Kconfig | 74 --
arch/powerpc/platforms/85xx/Makefile | 6
arch/powerpc/platforms/85xx/misc.c | 31 +
arch/powerpc/platforms/85xx/mpc8540_ads.h | 36 +
arch/powerpc/platforms/85xx/mpc85xx.h | 18
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 244 +++++++
arch/powerpc/platforms/85xx/pci.c | 96 +++
arch/powerpc/platforms/Makefile | 2
arch/powerpc/platforms/chrp/pegasos_eth.c | 2
arch/powerpc/platforms/chrp/setup.c | 2
arch/powerpc/platforms/chrp/time.c | 2
arch/powerpc/platforms/iseries/mf.c | 112 ++-
arch/powerpc/platforms/iseries/setup.c | 72 +-
arch/powerpc/platforms/maple/time.c | 2
arch/powerpc/platforms/powermac/cpufreq_32.c | 2
arch/powerpc/platforms/powermac/feature.c | 2
arch/powerpc/platforms/powermac/nvram.c | 2
arch/powerpc/platforms/powermac/setup.c | 8
arch/powerpc/platforms/pseries/Makefile | 3
arch/powerpc/platforms/pseries/firmware.c | 103 +++
arch/powerpc/platforms/pseries/firmware.h | 17
arch/powerpc/platforms/pseries/hvCall.S | 2
arch/powerpc/platforms/pseries/iommu.c | 4
arch/powerpc/platforms/pseries/pci.c | 2
arch/powerpc/platforms/pseries/setup.c | 67 --
arch/powerpc/platforms/pseries/smp.c | 2
arch/powerpc/platforms/pseries/xics.c | 3
arch/powerpc/sysdev/dart_iommu.c | 2
arch/powerpc/sysdev/dcr.S | 2
arch/powerpc/sysdev/fsl_soc.c | 292 ++++++--
arch/powerpc/sysdev/ipic.h | 2
arch/powerpc/xmon/xmon.c | 30 +
arch/ppc/4xx_io/serial_sicc.c | 5
arch/ppc/8xx_io/commproc.c | 6
arch/ppc/Kconfig | 47 +
arch/ppc/Kconfig.debug | 2
arch/ppc/amiga/amiints.c | 2
arch/ppc/amiga/bootinfo.c | 2
arch/ppc/amiga/cia.c | 2
arch/ppc/amiga/config.c | 2
arch/ppc/amiga/ints.c | 2
arch/ppc/boot/Makefile | 3
arch/ppc/boot/common/Makefile | 3
arch/ppc/boot/common/bootinfo.c | 2
arch/ppc/boot/common/misc-common.c | 2
arch/ppc/boot/common/ns16550.c | 3
arch/ppc/boot/common/serial_stub.c | 2
arch/ppc/boot/common/util.S | 2
arch/ppc/boot/include/mpc10x.h | 2
arch/ppc/boot/simple/Makefile | 1
arch/ppc/boot/simple/cpc700_memory.c | 2
arch/ppc/boot/simple/embed_config.c | 7
arch/ppc/boot/simple/head.S | 9
arch/ppc/boot/simple/misc-chestnut.c | 2
arch/ppc/boot/simple/misc-cpci690.c | 2
arch/ppc/boot/simple/misc-ev64260.c | 2
arch/ppc/boot/simple/misc-ev64360.c | 1
arch/ppc/boot/simple/misc-katana.c | 2
arch/ppc/boot/simple/misc-mv64x60.c | 2
arch/ppc/boot/simple/misc-prep.c | 2
arch/ppc/boot/simple/misc-radstone_ppc7d.c | 2
arch/ppc/boot/simple/misc-spruce.c | 2
arch/ppc/boot/simple/misc.c | 2
arch/ppc/boot/simple/mpc10x_memory.c | 2
arch/ppc/boot/simple/mpc52xx_tty.c | 2
arch/ppc/boot/simple/mv64x60_tty.c | 2
arch/ppc/boot/simple/openbios.c | 2
arch/ppc/boot/simple/relocate.S | 2
arch/ppc/boot/utils/mkbugboot.c | 2
arch/ppc/configs/ml300_defconfig | 739 ++++++++++++++++++++
arch/ppc/configs/ml403_defconfig | 740 ++++++++++++++++++++
arch/ppc/kernel/head_44x.S | 2
arch/ppc/kernel/head_8xx.S | 2
arch/ppc/kernel/head_fsl_booke.S | 6
arch/ppc/kernel/smp-tbsync.c | 3
arch/ppc/kernel/traps.c | 2
arch/ppc/lib/rheap.c | 2
arch/ppc/math-emu/math.c | 2
arch/ppc/mm/44x_mmu.c | 4
arch/ppc/mm/fault.c | 2
arch/ppc/mm/hashtable.S | 2
arch/ppc/platforms/4xx/Kconfig | 23 -
arch/ppc/platforms/4xx/Makefile | 4
arch/ppc/platforms/4xx/bamboo.c | 2
arch/ppc/platforms/4xx/bamboo.h | 2
arch/ppc/platforms/4xx/bubinga.h | 2
arch/ppc/platforms/4xx/cpci405.c | 2
arch/ppc/platforms/4xx/ebony.c | 2
arch/ppc/platforms/4xx/ebony.h | 2
arch/ppc/platforms/4xx/ep405.c | 2
arch/ppc/platforms/4xx/ep405.h | 2
arch/ppc/platforms/4xx/ibm405ep.c | 2
arch/ppc/platforms/4xx/ibm405ep.h | 2
arch/ppc/platforms/4xx/ibm405gp.h | 2
arch/ppc/platforms/4xx/ibm405gpr.c | 2
arch/ppc/platforms/4xx/ibm405gpr.h | 2
arch/ppc/platforms/4xx/ibm440ep.c | 2
arch/ppc/platforms/4xx/ibm440ep.h | 2
arch/ppc/platforms/4xx/ibm440gp.c | 2
arch/ppc/platforms/4xx/ibm440gp.h | 2
arch/ppc/platforms/4xx/ibm440gx.c | 2
arch/ppc/platforms/4xx/ibm440gx.h | 2
arch/ppc/platforms/4xx/ibm440sp.c | 2
arch/ppc/platforms/4xx/ibm440sp.h | 2
arch/ppc/platforms/4xx/ibmnp405h.c | 2
arch/ppc/platforms/4xx/ibmnp405h.h | 2
arch/ppc/platforms/4xx/ibmstb4.c | 2
arch/ppc/platforms/4xx/ibmstb4.h | 2
arch/ppc/platforms/4xx/ibmstbx25.c | 2
arch/ppc/platforms/4xx/ibmstbx25.h | 2
arch/ppc/platforms/4xx/luan.c | 2
arch/ppc/platforms/4xx/luan.h | 2
arch/ppc/platforms/4xx/ocotea.c | 2
arch/ppc/platforms/4xx/ocotea.h | 2
arch/ppc/platforms/4xx/ppc440spe.c | 2
arch/ppc/platforms/4xx/ppc440spe.h | 2
arch/ppc/platforms/4xx/redwood5.c | 2
arch/ppc/platforms/4xx/redwood5.h | 2
arch/ppc/platforms/4xx/redwood6.c | 2
arch/ppc/platforms/4xx/redwood6.h | 2
arch/ppc/platforms/4xx/sycamore.c | 2
arch/ppc/platforms/4xx/sycamore.h | 2
arch/ppc/platforms/4xx/virtex-ii_pro.c | 60 --
arch/ppc/platforms/4xx/virtex-ii_pro.h | 99 ---
arch/ppc/platforms/4xx/virtex.c | 56 ++
arch/ppc/platforms/4xx/virtex.h | 35 +
arch/ppc/platforms/4xx/walnut.c | 2
arch/ppc/platforms/4xx/walnut.h | 2
arch/ppc/platforms/4xx/xilinx_ml300.c | 76 +-
arch/ppc/platforms/4xx/xilinx_ml300.h | 6
arch/ppc/platforms/4xx/xilinx_ml403.c | 177 +++++
arch/ppc/platforms/4xx/xilinx_ml403.h | 49 +
arch/ppc/platforms/4xx/xparameters/xparameters.h | 37 +
.../platforms/4xx/xparameters/xparameters_ml403.h | 243 ++++++++
arch/ppc/platforms/4xx/yucca.c | 2
arch/ppc/platforms/4xx/yucca.h | 2
arch/ppc/platforms/83xx/mpc834x_sys.c | 2
arch/ppc/platforms/83xx/mpc834x_sys.h | 4
arch/ppc/platforms/85xx/mpc8540_ads.c | 2
arch/ppc/platforms/85xx/mpc8540_ads.h | 2
arch/ppc/platforms/85xx/mpc8555_cds.h | 2
arch/ppc/platforms/85xx/mpc8560_ads.c | 2
arch/ppc/platforms/85xx/mpc8560_ads.h | 2
arch/ppc/platforms/85xx/mpc85xx_ads_common.c | 2
arch/ppc/platforms/85xx/mpc85xx_ads_common.h | 2
arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 2
arch/ppc/platforms/85xx/mpc85xx_cds_common.h | 2
arch/ppc/platforms/85xx/sbc8560.c | 2
arch/ppc/platforms/85xx/sbc8560.h | 2
arch/ppc/platforms/85xx/sbc85xx.c | 2
arch/ppc/platforms/85xx/sbc85xx.h | 2
arch/ppc/platforms/85xx/stx_gp3.c | 2
arch/ppc/platforms/85xx/stx_gp3.h | 2
arch/ppc/platforms/85xx/tqm85xx.c | 2
arch/ppc/platforms/85xx/tqm85xx.h | 2
arch/ppc/platforms/Makefile | 3
arch/ppc/platforms/apus_setup.c | 2
arch/ppc/platforms/chestnut.c | 2
arch/ppc/platforms/chestnut.h | 2
arch/ppc/platforms/chrp_pegasos_eth.c | 2
arch/ppc/platforms/chrp_setup.c | 2
arch/ppc/platforms/chrp_time.c | 2
arch/ppc/platforms/cpci690.c | 4
arch/ppc/platforms/cpci690.h | 2
arch/ppc/platforms/ev64260.c | 4
arch/ppc/platforms/ev64260.h | 2
arch/ppc/platforms/ev64360.c | 4
arch/ppc/platforms/ev64360.h | 2
arch/ppc/platforms/fads.h | 2
arch/ppc/platforms/gemini.h | 3
arch/ppc/platforms/gemini_prom.S | 2
arch/ppc/platforms/gemini_setup.c | 2
arch/ppc/platforms/hdpu.c | 5
arch/ppc/platforms/hdpu.h | 2
arch/ppc/platforms/katana.c | 7
arch/ppc/platforms/katana.h | 2
arch/ppc/platforms/lite5200.c | 2
arch/ppc/platforms/lite5200.h | 2
arch/ppc/platforms/lopec.c | 2
arch/ppc/platforms/mpc8272ads_setup.c | 236 ++++++
arch/ppc/platforms/mpc866ads_setup.c | 273 +++++++
arch/ppc/platforms/mpc885ads_setup.c | 389 +++++++++++
arch/ppc/platforms/mvme5100.c | 2
arch/ppc/platforms/pal4.h | 2
arch/ppc/platforms/pal4_pci.c | 2
arch/ppc/platforms/pal4_serial.h | 2
arch/ppc/platforms/pal4_setup.c | 2
arch/ppc/platforms/powerpmc250.c | 2
arch/ppc/platforms/pplus.c | 2
arch/ppc/platforms/pplus.h | 2
arch/ppc/platforms/pq2ads.c | 2
arch/ppc/platforms/pq2ads.h | 4
arch/ppc/platforms/pq2ads_pd.h | 114 +++
arch/ppc/platforms/prep_setup.c | 2
arch/ppc/platforms/prpmc750.c | 2
arch/ppc/platforms/prpmc800.c | 2
arch/ppc/platforms/radstone_ppc7d.c | 7
arch/ppc/platforms/radstone_ppc7d.h | 2
arch/ppc/platforms/sandpoint.c | 2
arch/ppc/platforms/sandpoint.h | 2
arch/ppc/platforms/sbc82xx.c | 2
arch/ppc/platforms/spruce.c | 2
arch/ppc/platforms/tqm8260_setup.c | 2
arch/ppc/syslib/Makefile | 4
arch/ppc/syslib/cpc700.h | 2
arch/ppc/syslib/cpc700_pic.c | 2
arch/ppc/syslib/cpc710.h | 2
arch/ppc/syslib/gen550.h | 2
arch/ppc/syslib/gen550_dbg.c | 2
arch/ppc/syslib/gen550_kgdb.c | 2
arch/ppc/syslib/gt64260_pic.c | 2
arch/ppc/syslib/harrier.c | 2
arch/ppc/syslib/hawk_common.c | 2
arch/ppc/syslib/ibm440gp_common.c | 2
arch/ppc/syslib/ibm440gp_common.h | 2
arch/ppc/syslib/ibm440gx_common.c | 2
arch/ppc/syslib/ibm440gx_common.h | 2
arch/ppc/syslib/ibm440sp_common.c | 2
arch/ppc/syslib/ibm440sp_common.h | 2
arch/ppc/syslib/ibm44x_common.c | 2
arch/ppc/syslib/ibm44x_common.h | 2
arch/ppc/syslib/m8260_pci_erratum9.c | 2
arch/ppc/syslib/m8260_setup.c | 2
arch/ppc/syslib/m8xx_setup.c | 65 ++
arch/ppc/syslib/m8xx_wdt.c | 3
arch/ppc/syslib/mpc10x_common.c | 2
arch/ppc/syslib/mpc52xx_devices.c | 2
arch/ppc/syslib/mpc52xx_pci.c | 2
arch/ppc/syslib/mpc52xx_pci.h | 2
arch/ppc/syslib/mpc52xx_pic.c | 2
arch/ppc/syslib/mpc52xx_setup.c | 2
arch/ppc/syslib/mpc52xx_sys.c | 2
arch/ppc/syslib/mpc83xx_devices.c | 2
arch/ppc/syslib/mpc83xx_sys.c | 2
arch/ppc/syslib/mpc85xx_devices.c | 2
arch/ppc/syslib/mpc85xx_sys.c | 2
arch/ppc/syslib/mpc8xx_devices.c | 2
arch/ppc/syslib/mpc8xx_sys.c | 2
arch/ppc/syslib/mv64360_pic.c | 2
arch/ppc/syslib/mv64x60.c | 2
arch/ppc/syslib/mv64x60_dbg.c | 2
arch/ppc/syslib/mv64x60_win.c | 2
arch/ppc/syslib/ocp.c | 3
arch/ppc/syslib/open_pic.c | 2
arch/ppc/syslib/open_pic2.c | 2
arch/ppc/syslib/open_pic_defs.h | 2
arch/ppc/syslib/pci_auto.c | 2
arch/ppc/syslib/ppc4xx_dma.c | 2
arch/ppc/syslib/ppc4xx_pic.c | 2
arch/ppc/syslib/ppc4xx_pm.c | 47 -
arch/ppc/syslib/ppc4xx_sgdma.c | 2
arch/ppc/syslib/ppc83xx_setup.c | 2
arch/ppc/syslib/ppc83xx_setup.h | 2
arch/ppc/syslib/ppc85xx_common.c | 2
arch/ppc/syslib/ppc85xx_common.h | 2
arch/ppc/syslib/ppc85xx_setup.c | 2
arch/ppc/syslib/ppc85xx_setup.h | 2
arch/ppc/syslib/ppc_sys.c | 179 +++++
arch/ppc/syslib/pq2_devices.c | 2
arch/ppc/syslib/pq2_sys.c | 2
arch/ppc/syslib/prep_nvram.c | 2
arch/ppc/syslib/todc_time.c | 2
arch/ppc/syslib/xilinx_pic.c | 4
drivers/char/Kconfig | 2
drivers/char/hvcs.c | 9
drivers/macintosh/macio_asic.c | 5
drivers/macintosh/smu.c | 4
drivers/macintosh/therm_pm72.c | 2
drivers/macintosh/via-pmu.c | 5
drivers/macintosh/windfarm_lm75_sensor.c | 1
drivers/macintosh/windfarm_max6690_sensor.c | 1
drivers/macintosh/windfarm_smu_sat.c | 1
drivers/net/Kconfig | 1
include/asm-powerpc/atomic.h | 38 +
include/asm-powerpc/cputable.h | 38 +
include/asm-powerpc/cputime.h | 202 +++++
include/asm-powerpc/firmware.h | 16
include/asm-powerpc/irq.h | 6
include/asm-powerpc/iseries/mf.h | 7
include/asm-powerpc/lmb.h | 19 -
include/asm-powerpc/mmu.h | 1
include/asm-powerpc/paca.h | 7
include/asm-powerpc/pgtable-4k.h | 11
include/asm-powerpc/pgtable.h | 9
include/asm-powerpc/ppc_asm.h | 42 +
include/asm-powerpc/processor.h | 1
include/asm-powerpc/prom.h | 6
include/asm-powerpc/rwsem.h | 2
include/asm-powerpc/synch.h | 2
include/asm-powerpc/system.h | 6
include/asm-powerpc/time.h | 15
include/asm-ppc/harrier.h | 2
include/asm-ppc/ibm44x.h | 2
include/asm-ppc/ibm4xx.h | 4
include/asm-ppc/io.h | 7
include/asm-ppc/mpc10x.h | 3
include/asm-ppc/mpc52xx.h | 1
include/asm-ppc/mpc8260.h | 1
include/asm-ppc/mpc83xx.h | 1
include/asm-ppc/mpc85xx.h | 1
include/asm-ppc/mpc8xx.h | 3
include/asm-ppc/pgtable.h | 6
include/asm-ppc/ppc_sys.h | 34 +
include/asm-ppc/time.h | 5
include/asm-ppc/todc.h | 2
include/asm-ppc/xparameters.h | 18
kernel/auditsc.c | 2
lib/extable.c | 1
366 files changed, 6577 insertions(+), 1472 deletions(-)
create mode 100644 arch/powerpc/configs/mpc8540_ads_defconfig
create mode 100644 arch/powerpc/kernel/head_booke.h
create mode 100644 arch/powerpc/platforms/83xx/misc.c
create mode 100644 arch/powerpc/platforms/85xx/misc.c
create mode 100644 arch/powerpc/platforms/85xx/mpc8540_ads.h
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx.h
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_ads.c
create mode 100644 arch/powerpc/platforms/85xx/pci.c
create mode 100644 arch/powerpc/platforms/pseries/firmware.c
create mode 100644 arch/powerpc/platforms/pseries/firmware.h
create mode 100644 arch/ppc/configs/ml300_defconfig
create mode 100644 arch/ppc/configs/ml403_defconfig
delete mode 100644 arch/ppc/platforms/4xx/virtex-ii_pro.c
delete mode 100644 arch/ppc/platforms/4xx/virtex-ii_pro.h
create mode 100644 arch/ppc/platforms/4xx/virtex.c
create mode 100644 arch/ppc/platforms/4xx/virtex.h
create mode 100644 arch/ppc/platforms/4xx/xilinx_ml403.c
create mode 100644 arch/ppc/platforms/4xx/xilinx_ml403.h
create mode 100644 arch/ppc/platforms/4xx/xparameters/xparameters.h
create mode 100644 arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h
create mode 100644 arch/ppc/platforms/mpc8272ads_setup.c
create mode 100644 arch/ppc/platforms/mpc866ads_setup.c
create mode 100644 arch/ppc/platforms/mpc885ads_setup.c
create mode 100644 arch/ppc/platforms/pq2ads_pd.h
delete mode 100644 arch/ppc/syslib/ppc4xx_pm.c
delete mode 100644 include/asm-ppc/xparameters.h
^ permalink raw reply
* [PATCH] kdump:
From: Haren Myneni @ 2006-03-23 5:00 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, ellerman, Milton Miller, Olaf Hering
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
Paul, Please send this to upstream if you are OK with it. Tested this
one and kdump-dma-fault-fix.patch on P5, P4 (non-lpar), JS21 and JS20.
Thanks
Haren
Some times, the kexec CPU is not reponding to an IPI during kdump boot.
It is causing the system in xmon. This patch clears and EOI IPI for
kexec CPU as well before the kdump boot started.
Signed-off-by: Haren Myneni <haren@us.ibm.com>
[-- Attachment #2: kdump-clear-IPI.patch --]
[-- Type: text/x-patch, Size: 1169 bytes --]
--- 2616-git5-k1/arch/powerpc/platforms/pseries/xics.c.orig 2006-04-04 19:27:24.000000000 -0700
+++ 2616-git5-k1/arch/powerpc/platforms/pseries/xics.c 2006-04-04 19:54:52.000000000 -0700
@@ -641,22 +641,27 @@ void xics_teardown_cpu(int secondary)
iosync();
/*
+ * Clear IPI
+ */
+ ops->qirr_info(cpu, 0xff);
+ /*
+ * we need to EOI the IPI if we got here from kexec down IPI
+ *
+ * probably need to check all the other interrupts too
+ * should we be flagging idle loop instead?
+ * or creating some task to be scheduled?
+ */
+ ops->xirr_info_set(cpu, XICS_IPI);
+
+ /*
* Some machines need to have at least one cpu in the GIQ,
* so leave the master cpu in the group.
*/
- if (secondary) {
- /*
- * we need to EOI the IPI if we got here from kexec down IPI
- *
- * probably need to check all the other interrupts too
- * should we be flagging idle loop instead?
- * or creating some task to be scheduled?
- */
- ops->xirr_info_set(cpu, XICS_IPI);
+ if (secondary)
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 -
default_distrib_server, 0);
- }
+
}
#ifdef CONFIG_HOTPLUG_CPU
^ permalink raw reply
* [PATCH] kdump: clear and EOI IPI for kexec CPU
From: Haren Myneni @ 2006-03-23 5:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, ellerman, Milton Miller, Olaf Hering
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
Paul, Sorry, Please ignore the previous patch since it has one tab/space
issue. Tested this one and kdump-dma-fault-fix.patch on P5, P4
(non-lpar), JS21 and JS20.
Thanks
Haren
Some times, the kexec CPU is not reponding to an IPI during kdump boot.
It is causing the system in xmon. Noticed on power-4 (non-lpar). This
patch clears and EOI IPI for kexec CPU as well before the kdump boot
started.
Signed-off-by: Haren Myneni <haren@us.ibm.com>
[-- Attachment #2: kdump-clear-IPI.patch --]
[-- Type: text/x-patch, Size: 1162 bytes --]
--- 2616-git5-k1/arch/powerpc/platforms/pseries/xics.c.orig 2006-04-04 19:27:24.000000000 -0700
+++ 2616-git5-k1/arch/powerpc/platforms/pseries/xics.c 2006-04-04 20:06:19.000000000 -0700
@@ -641,22 +641,27 @@ void xics_teardown_cpu(int secondary)
iosync();
/*
+ * Clear IPI
+ */
+ ops->qirr_info(cpu, 0xff);
+ /*
+ * we need to EOI the IPI if we got here from kexec down IPI
+ *
+ * probably need to check all the other interrupts too
+ * should we be flagging idle loop instead?
+ * or creating some task to be scheduled?
+ */
+ ops->xirr_info_set(cpu, XICS_IPI);
+
+ /*
* Some machines need to have at least one cpu in the GIQ,
* so leave the master cpu in the group.
*/
- if (secondary) {
- /*
- * we need to EOI the IPI if we got here from kexec down IPI
- *
- * probably need to check all the other interrupts too
- * should we be flagging idle loop instead?
- * or creating some task to be scheduled?
- */
- ops->xirr_info_set(cpu, XICS_IPI);
+ if (secondary)
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 -
default_distrib_server, 0);
- }
+
}
#ifdef CONFIG_HOTPLUG_CPU
^ permalink raw reply
* Re: [PATCH] kdump: Fix for machine checkstop on DMA fault
From: Olof Johansson @ 2006-03-23 5:38 UTC (permalink / raw)
To: Haren Myneni
Cc: linuxppc-dev, ellerman, Paul Mackerras, Milton Miller,
Olaf Hering
In-Reply-To: <44222462.2030103@us.ibm.com>
On Wed, Mar 22, 2006 at 08:30:26PM -0800, Haren Myneni wrote:
> Paul, If you are OK with this fix, please send it upstream.
>
> Thanks
> Haren
>
> - Some machines checkstop on dma protection fault for ongoing DMA left
> in the first kernel. Since, we do not shutdown devices before the kdump
> boot, let them continue DMA to old kernel space.
How is this solved for regular kexec, doesn't the same problem exist
there?
-Olof
^ permalink raw reply
* Re: [PATCH] kdump: Fix for machine checkstop on DMA fault
From: Michael Ellerman @ 2006-03-23 6:06 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Milton Miller, Paul Mackerras, Olaf Hering, ellerman
In-Reply-To: <20060323053854.GA17693@pb15.lixom.net>
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
On Thu, 23 Mar 2006 16:38, Olof Johansson wrote:
> On Wed, Mar 22, 2006 at 08:30:26PM -0800, Haren Myneni wrote:
> > Paul, If you are OK with this fix, please send it upstream.
> >
> > Thanks
> > Haren
> >
> > - Some machines checkstop on dma protection fault for ongoing DMA left
> > in the first kernel. Since, we do not shutdown devices before the kdump
> > boot, let them continue DMA to old kernel space.
>
> How is this solved for regular kexec, doesn't the same problem exist
> there?
The idea for normal kexec is that the kernel should have shut everything down
properly. It's a bug if there are still DMAs going on. Hopefully.
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] kdump: Fix for machine checkstop on DMA fault
From: Olof Johansson @ 2006-03-23 6:19 UTC (permalink / raw)
To: Michael Ellerman
Cc: Milton Miller, linuxppc-dev, Paul Mackerras, Olaf Hering,
ellerman
In-Reply-To: <200603231706.35508.michael@ellerman.id.au>
On Thu, Mar 23, 2006 at 05:06:27PM +1100, Michael Ellerman wrote:
> On Thu, 23 Mar 2006 16:38, Olof Johansson wrote:
> > On Wed, Mar 22, 2006 at 08:30:26PM -0800, Haren Myneni wrote:
> > > Paul, If you are OK with this fix, please send it upstream.
> > >
> > > Thanks
> > > Haren
> > >
> > > - Some machines checkstop on dma protection fault for ongoing DMA left
> > > in the first kernel. Since, we do not shutdown devices before the kdump
> > > boot, let them continue DMA to old kernel space.
> >
> > How is this solved for regular kexec, doesn't the same problem exist
> > there?
>
> The idea for normal kexec is that the kernel should have shut everything down
> properly. It's a bug if there are still DMAs going on. Hopefully.
Thanks Michael.
In that case, I have to NACK the original patch.
Out of luck, it'll probably work in most cases, but there's always
the risk of a DMA still going on, the crash kernel remapping an entry,
and getting memory scribbled over.
The crash kernel needs to be even more careful, and instead read out
the entries that are mapped and reserve them. This would require a bit
more plumbing since there's no way to read an entry right now, but it'd
remove that hole.
-Olof
^ permalink raw reply
* [PATCH] powerpc: work around sparse warnings in cputable.h
From: Stephen Rothwell @ 2006-03-23 6:36 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
Christoph noticed that sparse warned about all the enum tags in cuptable.h
that had values that required them to be type log. (enum tags are ints
according to the standard.)
This patch attempts to fix them in the least intrusive way possible by
turning them all into #defines except for the 32 bit CPU_FTRS_POSSIBLE and
CPU_FTRS_ALWAYS which are hard to construct that way. This works because
these last two contain no bits above 2^31.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
include/asm-powerpc/cputable.h | 299 ++++++++++++++++++++--------------------
1 files changed, 152 insertions(+), 147 deletions(-)
This has been built for ppc64 and a previous version was built for ppc32.
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
533676ca33803d3ebe85eea9009cc2fd7e79c1d7
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index fe45f6f..4321483 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -188,153 +188,154 @@ extern void do_cpu_ftr_fixups(unsigned l
!defined(CONFIG_POWER3) && !defined(CONFIG_POWER4) && \
!defined(CONFIG_BOOKE))
-enum {
- CPU_FTRS_PPC601 = CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE,
- CPU_FTRS_603 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_604 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE,
- CPU_FTRS_740_NOTAU = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_740 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_750 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_750FX1 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP |
- CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM,
- CPU_FTRS_750FX2 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP |
- CPU_FTR_NO_DPM,
- CPU_FTRS_750FX = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP |
- CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS,
- CPU_FTRS_750GX = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
- CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU |
- CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP |
- CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS,
- CPU_FTRS_7400_NOTAU = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE |
- CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_7400 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR |
- CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE |
- CPU_FTR_MAYBE_CAN_NAP,
- CPU_FTRS_7450_20 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7450_21 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7450_23 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7455_1 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
- CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7455_20 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP |
- CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS,
- CPU_FTRS_7455 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7447_10 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC,
- CPU_FTRS_7447 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_7447A = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 |
- CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_NEED_COHERENT,
- CPU_FTRS_82XX = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB,
- CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
- CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
- CPU_FTRS_E300 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE |
- CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS |
- CPU_FTR_COMMON,
- CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE,
- CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE,
- CPU_FTRS_POWER4_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_NODSISRALIGN,
- CPU_FTRS_970_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_ALTIVEC_COMP |
- CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN,
- CPU_FTRS_8XX = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB,
- CPU_FTRS_40X = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_NODSISRALIGN,
- CPU_FTRS_44X = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_NODSISRALIGN,
- CPU_FTRS_E200 = CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN,
- CPU_FTRS_E500 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_NODSISRALIGN,
- CPU_FTRS_E500_2 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_BIG_PHYS | CPU_FTR_NODSISRALIGN,
- CPU_FTRS_GENERIC_32 = CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN,
+#define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE)
+#define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE)
+#define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_740 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_750 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_750FX1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \
+ CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM)
+#define CPU_FTRS_750FX2 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \
+ CPU_FTR_NO_DPM)
+#define CPU_FTRS_750FX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \
+ CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
+#define CPU_FTRS_750GX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \
+ CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \
+ CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS)
+#define CPU_FTRS_7400_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \
+ CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_7400 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \
+ CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \
+ CPU_FTR_MAYBE_CAN_NAP)
+#define CPU_FTRS_7450_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7450_21 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7450_23 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7455_1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7455_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \
+ CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS)
+#define CPU_FTRS_7455 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7447_10 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC)
+#define CPU_FTRS_7447 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_7447A (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
+ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_NEED_COHERENT)
+#define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB)
+#define CPU_FTRS_G2_LE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \
+ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS)
+#define CPU_FTRS_E300 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \
+ CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | \
+ CPU_FTR_COMMON)
+#define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE)
+#define CPU_FTRS_POWER3_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE)
+#define CPU_FTRS_POWER4_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_970_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_ALTIVEC_COMP | \
+ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB)
+#define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_44X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_E500 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_E500_2 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_BIG_PHYS | CPU_FTR_NODSISRALIGN)
+#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN)
#ifdef __powerpc64__
- CPU_FTRS_POWER3 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_IABR,
- CPU_FTRS_RS64 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
- CPU_FTR_MMCRA | CPU_FTR_CTRL,
- CPU_FTRS_POWER4 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA,
- CPU_FTRS_PPC970 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
- CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA,
- CPU_FTRS_POWER5 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
- CPU_FTR_MMCRA | CPU_FTR_SMT |
- CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE |
- CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR,
- CPU_FTRS_CELL = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 |
- CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT |
- CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO,
- CPU_FTRS_COMPATIBLE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
- CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2,
+#define CPU_FTRS_POWER3 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_IABR)
+#define CPU_FTRS_RS64 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \
+ CPU_FTR_MMCRA | CPU_FTR_CTRL)
+#define CPU_FTRS_POWER4 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA)
+#define CPU_FTRS_PPC970 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
+ CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA)
+#define CPU_FTRS_POWER5 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
+ CPU_FTR_MMCRA | CPU_FTR_SMT | \
+ CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
+ CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR)
+#define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \
+ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
+ CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO)
+#define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \
+ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2)
#endif
- CPU_FTRS_POSSIBLE =
#ifdef __powerpc64__
- CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 |
- CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL |
- CPU_FTR_CI_LARGE_PAGE |
+#define CPU_FTRS_POSSIBLE \
+ (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \
+ CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_CELL | \
+ CPU_FTR_CI_LARGE_PAGE)
#else
+enum {
+ CPU_FTRS_POSSIBLE =
#if CLASSIC_PPC
CPU_FTRS_PPC601 | CPU_FTRS_603 | CPU_FTRS_604 | CPU_FTRS_740_NOTAU |
CPU_FTRS_740 | CPU_FTRS_750 | CPU_FTRS_750FX1 |
@@ -368,14 +369,18 @@ enum {
#ifdef CONFIG_E500
CPU_FTRS_E500 | CPU_FTRS_E500_2 |
#endif
-#endif /* __powerpc64__ */
0,
+};
+#endif /* __powerpc64__ */
- CPU_FTRS_ALWAYS =
#ifdef __powerpc64__
- CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 &
- CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL &
+#define CPU_FTRS_ALWAYS \
+ (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \
+ CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_CELL & \
+ CPU_FTRS_POSSIBLE)
#else
+enum {
+ CPU_FTRS_ALWAYS =
#if CLASSIC_PPC
CPU_FTRS_PPC601 & CPU_FTRS_603 & CPU_FTRS_604 & CPU_FTRS_740_NOTAU &
CPU_FTRS_740 & CPU_FTRS_750 & CPU_FTRS_750FX1 &
@@ -409,9 +414,9 @@ enum {
#ifdef CONFIG_E500
CPU_FTRS_E500 & CPU_FTRS_E500_2 &
#endif
-#endif /* __powerpc64__ */
CPU_FTRS_POSSIBLE,
};
+#endif /* __powerpc64__ */
static inline int cpu_has_feature(unsigned long feature)
{
--
1.2.4
^ permalink raw reply related
* [PATCH] powerpc: fix various sparse warnings
From: Stephen Rothwell @ 2006-03-23 6:38 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/legacy_serial.c | 4 ++--
arch/powerpc/kernel/nvram_64.c | 3 ++-
arch/powerpc/kernel/process.c | 6 +++++-
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/lib/sstep.c | 2 +-
arch/powerpc/platforms/powermac/bootx_init.c | 2 +-
arch/powerpc/platforms/powermac/nvram.c | 12 ++++++------
arch/powerpc/platforms/powermac/udbg_scc.c | 2 +-
8 files changed, 19 insertions(+), 14 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
7debffaf860554fd5ff8029d306140094e8b5022
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index c7a799a..09d9c82 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -37,7 +37,7 @@ static int legacy_serial_console = -1;
static int __init add_legacy_port(struct device_node *np, int want_index,
int iotype, phys_addr_t base,
phys_addr_t taddr, unsigned long irq,
- unsigned int flags)
+ upf_t flags)
{
u32 *clk, *spd, clock = BASE_BAUD * 16;
int index;
@@ -113,7 +113,7 @@ static int __init add_legacy_soc_port(st
{
phys_addr_t addr;
u32 *addrp;
- unsigned int flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
+ upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
/* We only support ports that have a clock frequency properly
* encoded in the device-tree.
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index fd7db8d..6c3989f 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -174,8 +174,9 @@ static int dev_nvram_ioctl(struct inode
return 0;
}
#endif /* CONFIG_PPC_PMAC */
+ default:
+ return -EINVAL;
}
- return -EINVAL;
}
struct file_operations nvram_fops = {
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 1770a06..10a8363 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -363,7 +363,11 @@ static void show_instructions(struct pt_
if (!(i % 8))
printk("\n");
- if (BAD_PC(pc) || __get_user(instr, (unsigned int *)pc)) {
+ /* We use __get_user here *only* to avoid an OOPS on a
+ * bad address because the pc *should* only be a
+ * kernel address.
+ */
+ if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
printk("XXXXXXXX ");
} else {
if (regs->nip == pc)
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index db72a92..1861b73 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -111,7 +111,7 @@ unsigned long __init early_init(unsigned
/* First zero the BSS -- use memset_io, some platforms don't have
* caches on yet */
- memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
+ memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, _end - __bss_start);
/*
* Identify the CPU type and fix up code sections
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 666c2aa..c251d99 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -18,7 +18,7 @@ extern char system_call_common[];
#ifdef CONFIG_PPC64
/* Bits in SRR1 that are copied from MSR */
-#define MSR_MASK 0xffffffff87c0ffff
+#define MSR_MASK 0xffffffff87c0ffffUL
#else
#define MSR_MASK 0x87c0ffff
#endif
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c
index fa8b4d7..a94571b 100644
--- a/arch/powerpc/platforms/powermac/bootx_init.c
+++ b/arch/powerpc/platforms/powermac/bootx_init.c
@@ -493,7 +493,7 @@ void __init bootx_init(unsigned long r3,
&& (strcmp(model, "iMac,1") == 0
|| strcmp(model, "PowerMac1,1") == 0)) {
bootx_printf("iMac,1 detected, shutting down USB \n");
- out_le32((unsigned *)0x80880008, 1); /* XXX */
+ out_le32((unsigned __iomem *)0x80880008, 1); /* XXX */
}
}
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c
index 5fd2899..3aa3477 100644
--- a/arch/powerpc/platforms/powermac/nvram.c
+++ b/arch/powerpc/platforms/powermac/nvram.c
@@ -74,7 +74,7 @@ struct core99_header {
* Read and write the non-volatile RAM on PowerMacs and CHRP machines.
*/
static int nvram_naddrs;
-static volatile unsigned char *nvram_data;
+static volatile unsigned char __iomem *nvram_data;
static int is_core_99;
static int core99_bank = 0;
static int nvram_partitions[3];
@@ -148,7 +148,7 @@ static ssize_t core99_nvram_size(void)
}
#ifdef CONFIG_PPC32
-static volatile unsigned char *nvram_addr;
+static volatile unsigned char __iomem *nvram_addr;
static int nvram_mult;
static unsigned char direct_nvram_read_byte(int addr)
@@ -285,7 +285,7 @@ static int sm_erase_bank(int bank)
int stat, i;
unsigned long timeout;
- u8* base = (u8 *)nvram_data + core99_bank*NVRAM_SIZE;
+ u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
DBG("nvram: Sharp/Micron Erasing bank %d...\n", bank);
@@ -317,7 +317,7 @@ static int sm_write_bank(int bank, u8* d
int i, stat = 0;
unsigned long timeout;
- u8* base = (u8 *)nvram_data + core99_bank*NVRAM_SIZE;
+ u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
DBG("nvram: Sharp/Micron Writing bank %d...\n", bank);
@@ -352,7 +352,7 @@ static int amd_erase_bank(int bank)
int i, stat = 0;
unsigned long timeout;
- u8* base = (u8 *)nvram_data + core99_bank*NVRAM_SIZE;
+ u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
DBG("nvram: AMD Erasing bank %d...\n", bank);
@@ -399,7 +399,7 @@ static int amd_write_bank(int bank, u8*
int i, stat = 0;
unsigned long timeout;
- u8* base = (u8 *)nvram_data + core99_bank*NVRAM_SIZE;
+ u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
DBG("nvram: AMD Writing bank %d...\n", bank);
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index c4352a8..b4fa9f0 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -116,7 +116,7 @@ void udbg_scc_init(int force_scc)
/* Setup for 57600 8N1 */
if (ch == ch_a)
addr += 0x20;
- sccc = (volatile u8 * __iomem) ioremap(addr & PAGE_MASK, PAGE_SIZE) ;
+ sccc = ioremap(addr & PAGE_MASK, PAGE_SIZE) ;
sccc += addr & ~PAGE_MASK;
sccd = sccc + 0x10;
--
1.2.4
^ permalink raw reply related
* ibmveth initialisation failure
From: Anton Blanchard @ 2006-03-23 11:36 UTC (permalink / raw)
To: santil; +Cc: michael, linuxppc-dev
Hi,
While testing kdump I hit the register_logical_lan issue already under
discussion. Unfortunately we end up oopsing shortly after this.
It turns out we call ibmveth_change_mtu early in ->open, before we have
set everything up. ibmveth_change_mtu calls ibmveth_interrupt and
shortly after we call ibmveth_poll regardless of whether the device came
up properly:
(/drivers/net/ibmveth.c:515 ua:30000002) ERROR: h_register_logical_lan failed with -4
(drivers/net/ibmveth.c:520 ua:30000002) ERROR: buffer TCE:0x0 filter TCE:0x1000 rxq desc:0x8000701000002000 MAC:0xdad230003002
Unable to handle kernel paging request for data at address 0x00000000
cpu 0x2: Vector: 300 (Data Access) at [c00000000778bab0]
pc: c0000000022c44fc: .ibmveth_poll+0x94/0x77c
lr: c0000000023997f4: .net_rx_action+0xe4/0x220
dar: 0
[c00000000778be40] c0000000023997f4 .net_rx_action+0xe4/0x220
[c00000000778bef0] c0000000020538e8 .__do_softirq+0x98/0x164
[c00000000778bf90] c0000000020224d0 .call_do_softirq+0x14/0x24
[c0000000066e3790] c00000000200b73c .do_softirq+0x94/0xe0
[c0000000066e3820] c000000002053400 .local_bh_enable+0x58/0x8c
[c0000000066e38a0] c00000000242bb64 ._spin_unlock_bh+0x1c/0x30
[c0000000066e3920] c00000000238e3f4 .lock_sock+0xd4/0xf8
[c0000000066e39e0] c00000000238b87c .sock_fasync+0x9c/0x1b0
[c0000000066e3aa0] c00000000238c998 .sock_close+0x3c/0x60
[c0000000066e3b20] c0000000020b1904 .__fput+0xf8/0x238
[c0000000066e3bc0] c0000000020af054 .filp_close+0xac/0xd4
[c0000000066e3c50] c00000000204e7dc .put_files_struct+0xbc/0x148
[c0000000066e3cf0] c0000000020500e8 .do_exit+0x224/0x970
[c0000000066e3da0] c000000002050910 .sys_exit_group+0x0/0x8
[c0000000066e3e30] c00000000200871c syscall_exit+0x0/0x40
Shift ibmveth_change_mtu until after we have set everything up and
cannot fail.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: build/drivers/net/ibmveth.c
===================================================================
--- build.orig/drivers/net/ibmveth.c 2006-02-13 13:24:22.000000000 +1100
+++ build/drivers/net/ibmveth.c 2006-03-23 21:56:22.000000000 +1100
@@ -489,9 +489,6 @@ static int ibmveth_open(struct net_devic
adapter->rx_queue.num_slots = rxq_entries;
adapter->rx_queue.toggle = 1;
- /* call change_mtu to init the buffer pools based in initial mtu */
- ibmveth_change_mtu(netdev, netdev->mtu);
-
memcpy(&mac_address, netdev->dev_addr, netdev->addr_len);
mac_address = mac_address >> 16;
@@ -533,6 +530,9 @@ static int ibmveth_open(struct net_devic
return rc;
}
+ /* call change_mtu to init the buffer pools based in initial mtu */
+ ibmveth_change_mtu(netdev, netdev->mtu);
+
ibmveth_debug_printk("initial replenish cycle\n");
ibmveth_interrupt(netdev->irq, netdev, NULL);
^ permalink raw reply
* [PATCH 1/4] powerpc: Make BUG_ON & WARN_ON play nice with compile-time optimisations
From: Michael Ellerman @ 2006-03-23 12:32 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
Change BUG_ON and WARN_ON to give the compiler a chance to perform
compile-time optimsations. Depending on the complexity of the condition,
the compiler may not do this very well, so if it's important check the
object code.
Current GCC's (4.x) produce good code as long as the condition does not
include a function call, including a static inline.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
include/asm-powerpc/bug.h | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
Index: to-merge/include/asm-powerpc/bug.h
===================================================================
--- to-merge.orig/include/asm-powerpc/bug.h
+++ to-merge/include/asm-powerpc/bug.h
@@ -30,6 +30,12 @@ struct bug_entry *find_bug(unsigned long
#ifdef CONFIG_BUG
+/*
+ * BUG_ON() and WARN_ON() do their best to cooperate with compile-time
+ * optimisations. However depending on the complexity of the condition
+ * some compiler versions may not produce optimal results.
+ */
+
#define BUG() do { \
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
@@ -40,17 +46,36 @@ struct bug_entry *find_bug(unsigned long
} while (0)
#define BUG_ON(x) do { \
- __asm__ __volatile__( \
+ if (__builtin_constant_p(x)) { \
+ if (x) \
+ BUG(); \
+ } else { \
+ __asm__ __volatile__( \
"1: "PPC_TLNEI" %0,0\n" \
".section __bug_table,\"a\"\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
".previous" \
: : "r" ((long)(x)), "i" (__LINE__), \
"i" (__FILE__), "i" (__FUNCTION__)); \
+ } \
} while (0)
-#define WARN_ON(x) do { \
+#define WARN() do { \
__asm__ __volatile__( \
+ "1: twi 31,0,0\n" \
+ ".section __bug_table,\"a\"\n" \
+ "\t"PPC_LONG" 1b,%0,%1,%2\n" \
+ ".previous" \
+ : : "i" (__LINE__ + BUG_WARNING_TRAP), \
+ "i" (__FILE__), "i" (__FUNCTION__)); \
+} while (0)
+
+#define WARN_ON(x) do { \
+ if (__builtin_constant_p(x)) { \
+ if (x) \
+ WARN(); \
+ } else { \
+ __asm__ __volatile__( \
"1: "PPC_TLNEI" %0,0\n" \
".section __bug_table,\"a\"\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
@@ -58,6 +83,7 @@ struct bug_entry *find_bug(unsigned long
: : "r" ((long)(x)), \
"i" (__LINE__ + BUG_WARNING_TRAP), \
"i" (__FILE__), "i" (__FUNCTION__)); \
+ } \
} while (0)
#define HAVE_ARCH_BUG
^ permalink raw reply
* [PATCH 2/4] powerpc: Change firmware_has_feature() to a macro
From: Michael Ellerman @ 2006-03-23 12:33 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
In-Reply-To: <1143117144.850591.48752080269.qpush@concordia>
So that we can use firmware_has_feature() in a BUG_ON() and have the compiler
elide the code entirely if the feature can never be set, change
firmware_has_feature to a macro. Unfortunate, but necessary at least until
GCC bug #26724 is fixed.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
include/asm-powerpc/firmware.h | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
Index: to-merge/include/asm-powerpc/firmware.h
===================================================================
--- to-merge.orig/include/asm-powerpc/firmware.h
+++ to-merge/include/asm-powerpc/firmware.h
@@ -84,11 +84,9 @@ enum {
*/
extern unsigned long ppc64_firmware_features;
-static inline unsigned long firmware_has_feature(unsigned long feature)
-{
- return (FW_FEATURE_ALWAYS & feature) ||
- (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature);
-}
+#define firmware_has_feature(feature) \
+ ((FW_FEATURE_ALWAYS & (feature)) || \
+ (FW_FEATURE_POSSIBLE & ppc64_firmware_features & (feature)))
extern void system_reset_fwnmi(void);
extern void machine_check_fwnmi(void);
^ permalink raw reply
* [PATCH 3/4] powerpc: Rename and export ppc64_firmware_features
From: Michael Ellerman @ 2006-03-23 12:33 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
In-Reply-To: <1143117144.850591.48752080269.qpush@concordia>
We need to export ppc64_firmware_features for modules. Before we do that
I think we should probably rename it to powerpc_firmware_features.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/firmware.c | 2 +-
arch/powerpc/platforms/iseries/setup.c | 4 ++--
arch/powerpc/platforms/pseries/firmware.c | 2 +-
arch/powerpc/platforms/pseries/setup.c | 2 +-
include/asm-powerpc/firmware.h | 5 +++--
5 files changed, 8 insertions(+), 7 deletions(-)
Index: to-merge/arch/powerpc/kernel/firmware.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/firmware.c
+++ to-merge/arch/powerpc/kernel/firmware.c
@@ -17,4 +17,4 @@
#include <asm/firmware.h>
-unsigned long ppc64_firmware_features;
+unsigned long powerpc_firmware_features;
Index: to-merge/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/setup.c
+++ to-merge/arch/powerpc/platforms/iseries/setup.c
@@ -680,8 +680,8 @@ static int __init iseries_probe(int plat
if (PLATFORM_ISERIES_LPAR != platform)
return 0;
- ppc64_firmware_features |= FW_FEATURE_ISERIES;
- ppc64_firmware_features |= FW_FEATURE_LPAR;
+ powerpc_firmware_features |= FW_FEATURE_ISERIES;
+ powerpc_firmware_features |= FW_FEATURE_LPAR;
return 1;
}
Index: to-merge/arch/powerpc/platforms/pseries/firmware.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/firmware.c
+++ to-merge/arch/powerpc/platforms/pseries/firmware.c
@@ -91,7 +91,7 @@ void __init fw_feature_init(void)
continue;
/* we have a match */
- ppc64_firmware_features |=
+ powerpc_firmware_features |=
firmware_features_table[i].val;
break;
}
Index: to-merge/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/setup.c
+++ to-merge/arch/powerpc/platforms/pseries/setup.c
@@ -386,7 +386,7 @@ static int __init pSeries_probe(int plat
*/
if (platform == PLATFORM_PSERIES_LPAR)
- ppc64_firmware_features |= FW_FEATURE_LPAR;
+ powerpc_firmware_features |= FW_FEATURE_LPAR;
return 1;
}
Index: to-merge/include/asm-powerpc/firmware.h
===================================================================
--- to-merge.orig/include/asm-powerpc/firmware.h
+++ to-merge/include/asm-powerpc/firmware.h
@@ -82,11 +82,12 @@ enum {
/* This is used to identify firmware features which are available
* to the kernel.
*/
-extern unsigned long ppc64_firmware_features;
+extern unsigned long powerpc_firmware_features;
+EXPORT_SYMBOL_GPL(powerpc_firmware_features);
#define firmware_has_feature(feature) \
((FW_FEATURE_ALWAYS & (feature)) || \
- (FW_FEATURE_POSSIBLE & ppc64_firmware_features & (feature)))
+ (FW_FEATURE_POSSIBLE & powerpc_firmware_features & (feature)))
extern void system_reset_fwnmi(void);
extern void machine_check_fwnmi(void);
^ permalink raw reply
* [PATCH 4/4] powerpc: Cope with duplicate node & property names in /proc/device-tree
From: Michael Ellerman @ 2006-03-23 12:33 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
In-Reply-To: <1143117144.850591.48752080269.qpush@concordia>
Various dodgy firmware might give us nodes and/or properties in the device
tree with conflicting names. That's generally ok, except for when we export
the device tree via /proc, so check when we're creating the proc device tree
and munge names accordingly.
Tested on a faked device tree with kexec, would be good if someone with
actual bogus firmware could try it, but just for completeness.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
fs/proc/proc_devtree.c | 93 +++++++++++++++++++++++++++++++++++++------------
1 files changed, 72 insertions(+), 21 deletions(-)
Index: to-merge/fs/proc/proc_devtree.c
===================================================================
--- to-merge.orig/fs/proc/proc_devtree.c
+++ to-merge/fs/proc/proc_devtree.c
@@ -52,7 +52,8 @@ static int property_read_proc(char *page
* Add a property to a node
*/
static struct proc_dir_entry *
-__proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp)
+__proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp,
+ char *name)
{
struct proc_dir_entry *ent;
@@ -60,14 +61,14 @@ __proc_device_tree_add_prop(struct proc_
* Unfortunately proc_register puts each new entry
* at the beginning of the list. So we rearrange them.
*/
- ent = create_proc_read_entry(pp->name,
- strncmp(pp->name, "security-", 9)
+ ent = create_proc_read_entry(name,
+ strncmp(name, "security-", 9)
? S_IRUGO : S_IRUSR, de,
property_read_proc, pp);
if (ent == NULL)
return NULL;
- if (!strncmp(pp->name, "security-", 9))
+ if (!strncmp(name, "security-", 9))
ent->size = 0; /* don't leak number of password chars */
else
ent->size = pp->length;
@@ -78,7 +79,7 @@ __proc_device_tree_add_prop(struct proc_
void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop)
{
- __proc_device_tree_add_prop(pde, prop);
+ __proc_device_tree_add_prop(pde, prop, prop->name);
}
void proc_device_tree_remove_prop(struct proc_dir_entry *pde,
@@ -106,6 +107,61 @@ void proc_device_tree_update_prop(struct
}
/*
+ * Various dodgy firmware might give us nodes and/or properties with
+ * conflicting names. That's generally ok, except for exporting via /proc,
+ * so munge names here to ensure they're unique.
+ */
+
+static int duplicate_name(struct proc_dir_entry *de, char *name)
+{
+ struct proc_dir_entry *ent;
+
+ for (ent = de->subdir; ent != NULL; ent = ent->next)
+ if (strcmp(ent->name, name) == 0)
+ return 1;
+
+ return 0;
+}
+
+static char *fixup_name(struct device_node *np, struct proc_dir_entry *de,
+ char *name)
+{
+ char *fixed_name;
+ int fixup_len = strlen(name) + 2 + 1; /* name + #x + \0 */
+ int i = 1, size;
+
+realloc:
+ fixed_name = kmalloc(fixup_len, GFP_KERNEL);
+ if (fixed_name == NULL) {
+ printk(KERN_ERR "device-tree: Out of memory trying to fixup "
+ "name \"%s\"\n", name);
+ return name;
+ }
+
+retry:
+ size = snprintf(fixed_name, fixup_len, "%s#%d", name, i);
+ size++; /* account for NULL */
+
+ if (size > fixup_len) {
+ /* We ran out of space, free and reallocate. */
+ kfree(fixed_name);
+ fixup_len = size;
+ goto realloc;
+ }
+
+ if (duplicate_name(de, fixed_name)) {
+ /* Multiple duplicates. Retry with a different offset. */
+ i++;
+ goto retry;
+ }
+
+ printk(KERN_WARNING "device-tree: Duplicate name in %s, "
+ "renamed to \"%s\"\n", np->full_name, fixed_name);
+
+ return fixed_name;
+}
+
+/*
* Process a node, adding entries for its children and its properties.
*/
void proc_device_tree_add_node(struct device_node *np,
@@ -118,35 +174,30 @@ void proc_device_tree_add_node(struct de
set_node_proc_entry(np, de);
for (child = NULL; (child = of_get_next_child(np, child));) {
+ /* Use everything after the last slash, or the full name */
p = strrchr(child->full_name, '/');
if (!p)
p = child->full_name;
else
++p;
+
+ if (duplicate_name(de, p))
+ p = fixup_name(np, de, p);
+
ent = proc_mkdir(p, de);
if (ent == 0)
break;
proc_device_tree_add_node(child, ent);
}
of_node_put(child);
+
for (pp = np->properties; pp != 0; pp = pp->next) {
- /*
- * Yet another Apple device-tree bogosity: on some machines,
- * they have properties & nodes with the same name. Those
- * properties are quite unimportant for us though, thus we
- * simply "skip" them here, but we do have to check.
- */
- for (ent = de->subdir; ent != NULL; ent = ent->next)
- if (!strcmp(ent->name, pp->name))
- break;
- if (ent != NULL) {
- printk(KERN_WARNING "device-tree: property \"%s\" name"
- " conflicts with node in %s\n", pp->name,
- np->full_name);
- continue;
- }
+ p = pp->name;
+
+ if (duplicate_name(de, p))
+ p = fixup_name(np, de, p);
- ent = __proc_device_tree_add_prop(de, pp);
+ ent = __proc_device_tree_add_prop(de, pp, p);
if (ent == 0)
break;
}
^ permalink raw reply
* Re: [PATCH 3/4] powerpc: Rename and export ppc64_firmware_features
From: Stephen Rothwell @ 2006-03-23 13:17 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, paulus
In-Reply-To: <20060323123348.4815367C10@ozlabs.org>
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
On Thu, 23 Mar 2006 23:33:11 +1100 Michael Ellerman <michael@ellerman.id.au> wrote:
>
> +EXPORT_SYMBOL_GPL(powerpc_firmware_features);
This should be in firmware.c not a header file.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* pci-x
From: Carlos Mitidieri @ 2006-03-23 13:35 UTC (permalink / raw)
To: linuxppc-embedded
Is there PCI-X support for the mpc8540ads?
Thank you.
--
Carlos Mitidieri
SYSGO AG
^ permalink raw reply
* Memory mapping PCI memory region to user space
From: Wyse, Chris @ 2006-03-23 14:21 UTC (permalink / raw)
To: linuxppc-embedded, +linux-embedded
[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]
Hi,
I'm trying to map a PCI memory region 1 into user space from my driver
(PPC440GX, Linux 2.6.10). Here's the mmap routine of the driver that
I'm using:
staticfun
int phob_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct phob_file *fptr = filp->private_data;
struct phob_struct *dev = fptr->dev;
struct phob_region *rptr = &dev->region[1];
phys_addr_t physAddr;
physAddr = rptr->address + PPC44x_PCIMEM_PAGE;
if (io_remap_page_range(vma, vma->vm_start,
physAddr,
rptr->len,
vma->vm_page_prot))
return -EAGAIN;
}
Am I using the correct routine to do this?
When I use this routine, the pfn_pte (pgtable.h):
#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) |
pgprot_val(prot))
macro shifted out the high order bits of the pfn, which I didn't think
was correct, so I changed it to:
#define pfn_pte(pfn, prot) __pte((((unsigned long long) (pfn)) <<
PAGE_SHIFT) | pgprot_val(prot))
For reference, the call stack up to the pfn_pte macro is:
remap_pte_range()
remap_pmd_range()
remap_pfn_range()
io_remap_page_range()
After changing the macro, the value seems to be saved properly, and the
TLB gets updated properly when I get a TLB miss. However, when if I try
to write to the PCI from user space, I get an error from do_wp_page()
stating that it is a bogus pfn. If I try to read from user space, the
processor goes out to lunch and I need to reboot.
Am I missing something obvious? Anyone have any ideas on how to do this
and/or ways to debug it?
Thanks.
Chris Wyse
Member of Technical Staff
Embedded Technologies
860-749-1556 office
860-978-0849 cell
413-778-9101 fax
http://www.windriver.com <http://www.windriver.com/>
[-- Attachment #2: Type: text/html, Size: 6392 bytes --]
^ permalink raw reply
* Re: pci-x
From: Kumar Gala @ 2006-03-23 15:41 UTC (permalink / raw)
To: Carlos Mitidieri; +Cc: linuxppc-embedded
In-Reply-To: <200603231435.01008.carlos.mitidieri@sysgo.com>
On Mar 23, 2006, at 7:35 AM, Carlos Mitidieri wrote:
> Is there PCI-X support for the mpc8540ads?
Yes. You have to make sure the board is setup (switches in the right
place) properly for it.
- k
^ permalink raw reply
* Re: Memory mapping PCI memory region to user space
From: Kumar Gala @ 2006-03-23 15:44 UTC (permalink / raw)
To: Wyse, Chris; +Cc: +linux-embedded, linuxppc-embedded
In-Reply-To: <B1E46DE837A394458BB1A58F74A66A780596CB@ala-mail02.corp.ad.wrs.com>
On Mar 23, 2006, at 8:21 AM, Wyse, Chris wrote:
> Hi,
>
> I'm trying to map a PCI memory region 1 into user space from my
> driver (PPC440GX, Linux 2.6.10). Here's the mmap routine of the
> driver that I'm using:
Why don't use the mmap file exposed by sysfs so you dont have to
write your own code?
See Documentation/filesystems/sysfs-pci.txt. But effectively down
under /sys/bus/pci/devices/[domain:bus:dev:func]/ you will get
resource[0..N-1] that corresponds to each BAR on the device. This is
a mmap file to access that region.
- kumar
>
>
> staticfun
> int phob_mmap(struct file *filp, struct vm_area_struct *vma)
> {
> struct phob_file *fptr = filp->private_data;
> struct phob_struct *dev = fptr->dev;
> struct phob_region *rptr = &dev->region[1];
> phys_addr_t physAddr;
>
> physAddr = rptr->address + PPC44x_PCIMEM_PAGE;
> if (io_remap_page_range(vma, vma->vm_start,
> physAddr,
> rptr->len,
> vma->vm_page_prot))
> return -EAGAIN;
> }
> Am I using the correct routine to do this?
>
> When I use this routine, the pfn_pte (pgtable.h):
>
> #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) |
> pgprot_val(prot))
>
> macro shifted out the high order bits of the pfn, which I didn't
> think was correct, so I changed it to:
>
> #define pfn_pte(pfn, prot) __pte((((unsigned long long) (pfn))
> << PAGE_SHIFT) | pgprot_val(prot))
>
> For reference, the call stack up to the pfn_pte macro is:
>
> remap_pte_range()
> remap_pmd_range()
> remap_pfn_range()
> io_remap_page_range()
>
> After changing the macro, the value seems to be saved properly, and
> the TLB gets updated properly when I get a TLB miss. However, when
> if I try to write to the PCI from user space, I get an error from
> do_wp_page() stating that it is a bogus pfn. If I try to read from
> user space, the processor goes out to lunch and I need to reboot.
>
> Am I missing something obvious? Anyone have any ideas on how to do
> this and/or ways to debug it?
>
> Thanks.
>
> Chris Wyse
> Member of Technical Staff
> Embedded Technologies
> 860-749-1556 office
> 860-978-0849 cell
> 413-778-9101 fax
> http://www.windriver.com
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Support for Motorola Platforms
From: CJ Anderson @ 2006-03-23 16:27 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1.1: Type: text/plain, Size: 976 bytes --]
I found this email from a Google search for MVME761-001 boards.
I am looking for a supply of these boards.
Can you help? I need 32.
CJ
"Coming together is a beginning. Keeping
<http://www.aerotechcomp.com/> together is progress. Working together is
success. Quality in a service or product is not what you put into it, it is
what the customer gets out of it. If we don't take care of our customers,
someone else will."
CJ Anderson
Account Executive Aero Technical Components
8601 4th Street North
<http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=8601+4th+Street+North&csz=St
.+Petersburg%2C+FL+33702&country=us>
St. Petersburg, FL 33702
canderson@aerotechcomp.com
IM: cj-1311@hotmail.com
www.aerotechcomp.com <http://www.aerotechcomp.com/>
tel:
fax: (727) 577-6115
(727) 563-9134
<https://www.plaxo.com/add_me?u=4295630737&v0=1321534&k0=640037876> Add me
to your address book... <http://www.plaxo.com/signature> Want a signature
like this?
[-- Attachment #1.2: Type: text/html, Size: 5775 bytes --]
[-- Attachment #2: ATC10t.jpg --]
[-- Type: image/jpeg, Size: 6907 bytes --]
^ permalink raw reply
* Re: swizzling pci irqs
From: David Updegraff @ 2006-03-23 16:40 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <E895715F-A853-4A27-8076-90A1973273E2@kernel.crashing.org>
Kumar Gala wrote:
> On Mar 22, 2006, at 2:59 PM, David Updegraff wrote:
>
>
>>Hi.
>>
>>If there were a noswizzle option to the kernel command line that
>>resulted in pci scan simply trusting that the bootrom/u-boot had
>>already
>>correctly assigned the PCI irqs.... every tom,dick,harry, and
>>yours-truly wouldn't have to make a new platform to define the
>>swizzle-o-the-day. Or have I already missed this argument?
>
>
> Sure, I do this now. Just don't build pci_auto into your pci support
> and don't explicitly rescan in your pci setup. The 83xx pci code
> under arch/powerpc should effective do this.
>
> - kumar
Hmm; I must be missing something... cuz to me it looks like pci_32.c
will allways call pcibios_init, which will will scan the bus, which will
swizzle irqs if the platform has non-null swizzle and map_irq function
pointers defined.. Perhaps a setting I've missed somewhere re.
'pci_auto', which I thought was a 'ppc' thing, not a 'powerpc' thing..??
-dbu.
^ permalink raw reply
* Re: new sound driver
From: Johannes Berg @ 2006-03-23 17:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alastair Poole
In-Reply-To: <1143020119.11724.41.camel@localhost>
[-- Attachment #1: Type: text/plain, Size: 2454 bytes --]
Obviously, I'm still collecting information. For future reference and
archiving, here's the contents of a file I just added to my code
describing how apple derives i2s clocks. Well, as far as I can see from
their code.
Short description of the i2s clock derivation system Apple uses.
The i2s chip Apple uses has three available clocks: 18432000, 45158400 and
49152000 Hz. These are used to drive the codec's system clock as well as the
i2s transfer bus.
The clocks for these are derived as follows:
First, you need to know the sampling frequency you want to use, and the
system clock the codec requires. The pcm3052 (onyx) for example requires a
system clock of 256*sampling frequency.
Thus, you divide the clock source speed by the sampling frequency and then
the factor the codec chip requires. This is the 'mclk divisor'.
Now you can derive the system clock from the clock source by taking only
every 'mclk divisor' transition of the clock, and thus you get a system
clock of the required speed.
Next, you need to know the i2s bus speed wrt. the sampling frequency. For
Sony and I2S 32x serial formats, this is 32*sampling frequency, for the I2S
64x format it is 64*sampling frequency. Since the i2s wire clock is derived
from the system clock we have already derived from the clock source, you
need to put as 'sclk divisor' the factor between the system clock of the
codec and the bus clock, for example 256/32 (=8) if the codec is driven in
Sony mode.
For the 'sclk divisor' you have to take care that it is an even number or 1
or 3, other values cannot be represented to the i2s chip (see logic in
i2sbus.h).
With a codec system clock (MClk) of 256*sampling frequency, you can have the
following frequencies (in the range from 8KHz to 96KHz) depending on the
clock source you use:
18432000: 9000 12000 14400 18000 24000 36000 72000
45158400: 8820 9800 11025 12600 14700 17640 22050 29400 35280 44100 58800 88200
49152000: 8000 9600 12000 16000 19200 24000 32000 38400 48000 64000 96000
(this is exactly what we can do with the onyx chip)
to create this table use calc (debian package apcalc):
min=8000
max=96000
clock=49152000
factor=256
for (f=min;f<=max;f++) {
if ((clock%f==0) && ((clock/f)%factor == 0)) {
div = clock/f/factor ;
n = ceil(div/2-1) ;
if ((div==1||div==3||div==5||div==14||(2*(n+1)==div && n<0x1f))
&& (1))
print f,
}
}
print ''
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]
^ permalink raw reply
* Re: Memory mapping PCI memory region to user space
From: David Hawkins @ 2006-03-23 17:04 UTC (permalink / raw)
To: Wyse, Chris; +Cc: +linux-embedded, linuxppc-embedded
In-Reply-To: <B1E46DE837A394458BB1A58F74A66A780596CB@ala-mail02.corp.ad.wrs.com>
> I'm trying to map a PCI memory region 1 into user space from my driver
> (PPC440GX, Linux 2.6.10). Here's the mmap routine of the driver that
> I'm using:
Hi Chris,
I wrote a generic PCI IO driver when testing the
Yosemite 440EP, take a look at the code, its fairly
well commented. You probably just need to add the
PCI vendor ID for your target board:
(or you can echo the deviceID:vendorID to the
sysfs node for the driver)
http://www.ovro.caltech.edu/~dwh/pci_io.tar.gz
There's some comments in here on it:
http://www.ovro.caltech.edu/~dwh/correlator/pdf/LNX-723-Hawkins.pdf
For example, on an x86 system, I was looking for
a PLX PCI9054 10b5:9054, and then on the yosemite
board I was looking for the same hardware.
In your case, its not clear from your email whether you
are on a 440GX looking for another device, or on a host
looking for a 440GX. Either way, the driver should work.
Cheers
Dave
^ permalink raw reply
* Re: Memory mapping PCI memory region to user space
From: David Hawkins @ 2006-03-23 17:12 UTC (permalink / raw)
To: Kumar Gala; +Cc: Wyse, Chris, +linux-embedded, linuxppc-embedded
In-Reply-To: <204E7000-3E88-4497-86C0-5AF786D72F75@kernel.crashing.org>
> Why don't use the mmap file exposed by sysfs so you dont have to
> write your own code?
>
> See Documentation/filesystems/sysfs-pci.txt. But effectively down
> under /sys/bus/pci/devices/[domain:bus:dev:func]/ you will get
> resource[0..N-1] that corresponds to each BAR on the device. This is
> a mmap file to access that region.
Hi Kumar,
Most likely he didn't know about it, I didn't :)
When I was testing the Yosemite board as the host, I found
that I could set the endian flag on the mmapped page, which
then made the PCI device registers read as 32-bit quantities
read back with the same layout under both x86 and PPC
hosts.
So, if someone planned on using that 'feature', that would
be a reason for writing your own mmap() implementation.
I didn't see any option in the sysfs file for setting that
page flag (but, I didn't look around in other sysfs files).
Thanks for the pointer to the sysfs node!
Cheers
Dave
^ 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