提交 2161558f 编写于 作者: K Kyle McMartin

Merge branch 'master'

...@@ -24,6 +24,8 @@ DMA-mapping.txt ...@@ -24,6 +24,8 @@ DMA-mapping.txt
- info for PCI drivers using DMA portably across all platforms. - info for PCI drivers using DMA portably across all platforms.
DocBook/ DocBook/
- directory with DocBook templates etc. for kernel documentation. - directory with DocBook templates etc. for kernel documentation.
HOWTO
- The process and procedures of how to do Linux kernel development.
IO-mapping.txt IO-mapping.txt
- how to access I/O mapped memory from within device drivers. - how to access I/O mapped memory from within device drivers.
IPMI.txt IPMI.txt
...@@ -256,6 +258,10 @@ specialix.txt ...@@ -256,6 +258,10 @@ specialix.txt
- info on hardware/driver for specialix IO8+ multiport serial card. - info on hardware/driver for specialix IO8+ multiport serial card.
spinlocks.txt spinlocks.txt
- info on using spinlocks to provide exclusive access in kernel. - info on using spinlocks to provide exclusive access in kernel.
stable_api_nonsense.txt
- info on why the kernel does not have a stable in-kernel api or abi.
stable_kernel_rules.txt
- rules and procedures for the -stable kernel releases.
stallion.txt stallion.txt
- info on using the Stallion multiport serial driver. - info on using the Stallion multiport serial driver.
svga.txt svga.txt
......
此差异已折叠。
...@@ -58,6 +58,7 @@ P: Person ...@@ -58,6 +58,7 @@ P: Person
M: Mail patches to M: Mail patches to
L: Mailing list that is relevant to this area L: Mailing list that is relevant to this area
W: Web-page with status/info W: Web-page with status/info
T: SCM tree type and URL. Type is one of: git, hg, quilt.
S: Status, one of the following: S: Status, one of the following:
Supported: Someone is actually paid to look after this. Supported: Someone is actually paid to look after this.
...@@ -183,6 +184,7 @@ P: Len Brown ...@@ -183,6 +184,7 @@ P: Len Brown
M: len.brown@intel.com M: len.brown@intel.com
L: acpi-devel@lists.sourceforge.net L: acpi-devel@lists.sourceforge.net
W: http://acpi.sourceforge.net/ W: http://acpi.sourceforge.net/
T: git kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
S: Maintained S: Maintained
AD1816 SOUND DRIVER AD1816 SOUND DRIVER
...@@ -418,6 +420,7 @@ BLOCK LAYER ...@@ -418,6 +420,7 @@ BLOCK LAYER
P: Jens Axboe P: Jens Axboe
M: axboe@suse.de M: axboe@suse.de
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
S: Maintained S: Maintained
BLUETOOTH SUBSYSTEM BLUETOOTH SUBSYSTEM
...@@ -803,12 +806,14 @@ DRIVER CORE, KOBJECTS, AND SYSFS ...@@ -803,12 +806,14 @@ DRIVER CORE, KOBJECTS, AND SYSFS
P: Greg Kroah-Hartman P: Greg Kroah-Hartman
M: gregkh@suse.de M: gregkh@suse.de
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Supported S: Supported
DRM DRIVERS DRM DRIVERS
P: David Airlie P: David Airlie
M: airlied@linux.ie M: airlied@linux.ie
L: dri-devel@lists.sourceforge.net L: dri-devel@lists.sourceforge.net
T: git kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git
S: Maintained S: Maintained
DSCC4 DRIVER DSCC4 DRIVER
...@@ -1113,6 +1118,7 @@ P: Jean Delvare ...@@ -1113,6 +1118,7 @@ P: Jean Delvare
M: khali@linux-fr.org M: khali@linux-fr.org
L: lm-sensors@lm-sensors.org L: lm-sensors@lm-sensors.org
W: http://www.lm-sensors.nu/ W: http://www.lm-sensors.nu/
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Maintained S: Maintained
I2O I2O
...@@ -1145,6 +1151,7 @@ P: Tony Luck ...@@ -1145,6 +1151,7 @@ P: Tony Luck
M: tony.luck@intel.com M: tony.luck@intel.com
L: linux-ia64@vger.kernel.org L: linux-ia64@vger.kernel.org
W: http://www.ia64-linux.org/ W: http://www.ia64-linux.org/
T: git kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
S: Maintained S: Maintained
SN-IA64 (Itanium) SUB-PLATFORM SN-IA64 (Itanium) SUB-PLATFORM
...@@ -1212,6 +1219,7 @@ P: Jody McIntyre ...@@ -1212,6 +1219,7 @@ P: Jody McIntyre
M: scjody@steamballoon.com M: scjody@steamballoon.com
L: linux1394-devel@lists.sourceforge.net L: linux1394-devel@lists.sourceforge.net
W: http://www.linux1394.org/ W: http://www.linux1394.org/
T: git kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394.git
S: Maintained S: Maintained
IEEE 1394 OHCI DRIVER IEEE 1394 OHCI DRIVER
...@@ -1263,6 +1271,7 @@ P: Hal Rosenstock ...@@ -1263,6 +1271,7 @@ P: Hal Rosenstock
M: halr@voltaire.com M: halr@voltaire.com
L: openib-general@openib.org L: openib-general@openib.org
W: http://www.openib.org/ W: http://www.openib.org/
T: git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
S: Supported S: Supported
INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
...@@ -1436,6 +1445,7 @@ P: Kai Germaschewski ...@@ -1436,6 +1445,7 @@ P: Kai Germaschewski
M: kai@germaschewski.name M: kai@germaschewski.name
P: Sam Ravnborg P: Sam Ravnborg
M: sam@ravnborg.org M: sam@ravnborg.org
T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
S: Maintained S: Maintained
KERNEL JANITORS KERNEL JANITORS
...@@ -1782,6 +1792,7 @@ M: akpm@osdl.org ...@@ -1782,6 +1792,7 @@ M: akpm@osdl.org
P: Jeff Garzik P: Jeff Garzik
M: jgarzik@pobox.com M: jgarzik@pobox.com
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
S: Maintained S: Maintained
NETWORKING [GENERAL] NETWORKING [GENERAL]
...@@ -1959,6 +1970,7 @@ P: Greg Kroah-Hartman ...@@ -1959,6 +1970,7 @@ P: Greg Kroah-Hartman
M: gregkh@suse.de M: gregkh@suse.de
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
L: linux-pci@atrey.karlin.mff.cuni.cz L: linux-pci@atrey.karlin.mff.cuni.cz
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Supported S: Supported
PCI HOTPLUG CORE PCI HOTPLUG CORE
...@@ -1980,6 +1992,7 @@ S: Maintained ...@@ -1980,6 +1992,7 @@ S: Maintained
PCMCIA SUBSYSTEM PCMCIA SUBSYSTEM
P: Linux PCMCIA Team P: Linux PCMCIA Team
L: http://lists.infradead.org/mailman/listinfo/linux-pcmcia L: http://lists.infradead.org/mailman/listinfo/linux-pcmcia
T: git kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
S: Maintained S: Maintained
PCNET32 NETWORK DRIVER PCNET32 NETWORK DRIVER
...@@ -2189,6 +2202,7 @@ SCSI SUBSYSTEM ...@@ -2189,6 +2202,7 @@ SCSI SUBSYSTEM
P: James E.J. Bottomley P: James E.J. Bottomley
M: James.Bottomley@SteelEye.com M: James.Bottomley@SteelEye.com
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
S: Maintained S: Maintained
SCSI TAPE DRIVER SCSI TAPE DRIVER
...@@ -2228,6 +2242,7 @@ SERIAL ATA (SATA) SUBSYSTEM: ...@@ -2228,6 +2242,7 @@ SERIAL ATA (SATA) SUBSYSTEM:
P: Jeff Garzik P: Jeff Garzik
M: jgarzik@pobox.com M: jgarzik@pobox.com
L: linux-ide@vger.kernel.org L: linux-ide@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
S: Supported S: Supported
SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER
...@@ -2749,6 +2764,7 @@ M: gregkh@suse.de ...@@ -2749,6 +2764,7 @@ M: gregkh@suse.de
L: linux-usb-users@lists.sourceforge.net L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net
W: http://www.linux-usb.org W: http://www.linux-usb.org
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S: Supported S: Supported
USB UHCI DRIVER USB UHCI DRIVER
......
...@@ -91,16 +91,17 @@ ENTRY(vhpt_miss) ...@@ -91,16 +91,17 @@ ENTRY(vhpt_miss)
* (the "original") TLB miss, which may either be caused by an instruction * (the "original") TLB miss, which may either be caused by an instruction
* fetch or a data access (or non-access). * fetch or a data access (or non-access).
* *
* What we do here is normal TLB miss handing for the _original_ miss, followed * What we do here is normal TLB miss handing for the _original_ miss,
* by inserting the TLB entry for the virtual page table page that the VHPT * followed by inserting the TLB entry for the virtual page table page
* walker was attempting to access. The latter gets inserted as long * that the VHPT walker was attempting to access. The latter gets
* as both L1 and L2 have valid mappings for the faulting address. * inserted as long as page table entry above pte level have valid
* The TLB entry for the original miss gets inserted only if * mappings for the faulting address. The TLB entry for the original
* the L3 entry indicates that the page is present. * miss gets inserted only if the pte entry indicates that the page is
* present.
* *
* do_page_fault gets invoked in the following cases: * do_page_fault gets invoked in the following cases:
* - the faulting virtual address uses unimplemented address bits * - the faulting virtual address uses unimplemented address bits
* - the faulting virtual address has no L1, L2, or L3 mapping * - the faulting virtual address has no valid page table mapping
*/ */
mov r16=cr.ifa // get address that caused the TLB miss mov r16=cr.ifa // get address that caused the TLB miss
#ifdef CONFIG_HUGETLB_PAGE #ifdef CONFIG_HUGETLB_PAGE
...@@ -126,7 +127,7 @@ ENTRY(vhpt_miss) ...@@ -126,7 +127,7 @@ ENTRY(vhpt_miss)
#endif #endif
;; ;;
cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5? cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5?
shr.u r18=r22,PGDIR_SHIFT // get bits 33-63 of the faulting address shr.u r18=r22,PGDIR_SHIFT // get bottom portion of pgd index bit
;; ;;
(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place (p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place
...@@ -137,38 +138,38 @@ ENTRY(vhpt_miss) ...@@ -137,38 +138,38 @@ ENTRY(vhpt_miss)
(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT (p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT
(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 (p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3
;; ;;
(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5
(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4]
cmp.eq p7,p6=0,r21 // unused address bits all zeroes? cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
shr.u r28=r22,PUD_SHIFT // shift L2 index into position shr.u r28=r22,PUD_SHIFT // shift pud index into position
#else #else
shr.u r18=r22,PMD_SHIFT // shift L3 index into position shr.u r18=r22,PMD_SHIFT // shift pmd index into position
#endif #endif
;; ;;
ld8 r17=[r17] // fetch the L1 entry (may be 0) ld8 r17=[r17] // get *pgd (may be 0)
;; ;;
(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL?
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
dep r28=r28,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry dep r28=r28,r17,3,(PAGE_SHIFT-3) // r28=pud_offset(pgd,addr)
;; ;;
shr.u r18=r22,PMD_SHIFT // shift L3 index into position shr.u r18=r22,PMD_SHIFT // shift pmd index into position
(p7) ld8 r29=[r28] // fetch the L2 entry (may be 0) (p7) ld8 r29=[r28] // get *pud (may be 0)
;; ;;
(p7) cmp.eq.or.andcm p6,p7=r29,r0 // was L2 entry NULL? (p7) cmp.eq.or.andcm p6,p7=r29,r0 // was pud_present(*pud) == NULL?
dep r17=r18,r29,3,(PAGE_SHIFT-3) // compute address of L3 page table entry dep r17=r18,r29,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr)
#else #else
dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pgd,addr)
#endif #endif
;; ;;
(p7) ld8 r20=[r17] // fetch the L3 entry (may be 0) (p7) ld8 r20=[r17] // get *pmd (may be 0)
shr.u r19=r22,PAGE_SHIFT // shift L4 index into position shr.u r19=r22,PAGE_SHIFT // shift pte index into position
;; ;;
(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was L3 entry NULL? (p7) cmp.eq.or.andcm p6,p7=r20,r0 // was pmd_present(*pmd) == NULL?
dep r21=r19,r20,3,(PAGE_SHIFT-3) // compute address of L4 page table entry dep r21=r19,r20,3,(PAGE_SHIFT-3) // r21=pte_offset(pmd,addr)
;; ;;
(p7) ld8 r18=[r21] // read the L4 PTE (p7) ld8 r18=[r21] // read *pte
mov r19=cr.isr // cr.isr bit 0 tells us if this is an insn miss mov r19=cr.isr // cr.isr bit 32 tells us if this is an insn miss
;; ;;
(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? (p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared?
mov r22=cr.iha // get the VHPT address that caused the TLB miss mov r22=cr.iha // get the VHPT address that caused the TLB miss
...@@ -202,25 +203,33 @@ ENTRY(vhpt_miss) ...@@ -202,25 +203,33 @@ ENTRY(vhpt_miss)
dv_serialize_data dv_serialize_data
/* /*
* Re-check L2 and L3 pagetable. If they changed, we may have received a ptc.g * Re-check pagetable entry. If they changed, we may have received a ptc.g
* between reading the pagetable and the "itc". If so, flush the entry we * between reading the pagetable and the "itc". If so, flush the entry we
* inserted and retry. * inserted and retry. At this point, we have:
*
* r28 = equivalent of pud_offset(pgd, ifa)
* r17 = equivalent of pmd_offset(pud, ifa)
* r21 = equivalent of pte_offset(pmd, ifa)
*
* r29 = *pud
* r20 = *pmd
* r18 = *pte
*/ */
ld8 r25=[r21] // read L4 entry again ld8 r25=[r21] // read *pte again
ld8 r26=[r17] // read L3 PTE again ld8 r26=[r17] // read *pmd again
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
ld8 r18=[r28] // read L2 entry again ld8 r19=[r28] // read *pud again
#endif #endif
cmp.ne p6,p7=r0,r0 cmp.ne p6,p7=r0,r0
;; ;;
cmp.ne.or.andcm p6,p7=r26,r20 // did L3 entry change cmp.ne.or.andcm p6,p7=r26,r20 // did *pmd change
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
cmp.ne.or.andcm p6,p7=r29,r18 // did L4 PTE change cmp.ne.or.andcm p6,p7=r19,r29 // did *pud change
#endif #endif
mov r27=PAGE_SHIFT<<2 mov r27=PAGE_SHIFT<<2
;; ;;
(p6) ptc.l r22,r27 // purge PTE page translation (p6) ptc.l r22,r27 // purge PTE page translation
(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did L4 PTE change (p7) cmp.ne.or.andcm p6,p7=r25,r18 // did *pte change
;; ;;
(p6) ptc.l r16,r27 // purge translation (p6) ptc.l r16,r27 // purge translation
#endif #endif
...@@ -235,19 +244,19 @@ END(vhpt_miss) ...@@ -235,19 +244,19 @@ END(vhpt_miss)
ENTRY(itlb_miss) ENTRY(itlb_miss)
DBG_FAULT(1) DBG_FAULT(1)
/* /*
* The ITLB handler accesses the L3 PTE via the virtually mapped linear * The ITLB handler accesses the PTE via the virtually mapped linear
* page table. If a nested TLB miss occurs, we switch into physical * page table. If a nested TLB miss occurs, we switch into physical
* mode, walk the page table, and then re-execute the L3 PTE read * mode, walk the page table, and then re-execute the PTE read and
* and go on normally after that. * go on normally after that.
*/ */
mov r16=cr.ifa // get virtual address mov r16=cr.ifa // get virtual address
mov r29=b0 // save b0 mov r29=b0 // save b0
mov r31=pr // save predicates mov r31=pr // save predicates
.itlb_fault: .itlb_fault:
mov r17=cr.iha // get virtual address of L3 PTE mov r17=cr.iha // get virtual address of PTE
movl r30=1f // load nested fault continuation point movl r30=1f // load nested fault continuation point
;; ;;
1: ld8 r18=[r17] // read L3 PTE 1: ld8 r18=[r17] // read *pte
;; ;;
mov b0=r29 mov b0=r29
tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
...@@ -262,7 +271,7 @@ ENTRY(itlb_miss) ...@@ -262,7 +271,7 @@ ENTRY(itlb_miss)
*/ */
dv_serialize_data dv_serialize_data
ld8 r19=[r17] // read L3 PTE again and see if same ld8 r19=[r17] // read *pte again and see if same
mov r20=PAGE_SHIFT<<2 // setup page size for purge mov r20=PAGE_SHIFT<<2 // setup page size for purge
;; ;;
cmp.ne p7,p0=r18,r19 cmp.ne p7,p0=r18,r19
...@@ -279,19 +288,19 @@ END(itlb_miss) ...@@ -279,19 +288,19 @@ END(itlb_miss)
ENTRY(dtlb_miss) ENTRY(dtlb_miss)
DBG_FAULT(2) DBG_FAULT(2)
/* /*
* The DTLB handler accesses the L3 PTE via the virtually mapped linear * The DTLB handler accesses the PTE via the virtually mapped linear
* page table. If a nested TLB miss occurs, we switch into physical * page table. If a nested TLB miss occurs, we switch into physical
* mode, walk the page table, and then re-execute the L3 PTE read * mode, walk the page table, and then re-execute the PTE read and
* and go on normally after that. * go on normally after that.
*/ */
mov r16=cr.ifa // get virtual address mov r16=cr.ifa // get virtual address
mov r29=b0 // save b0 mov r29=b0 // save b0
mov r31=pr // save predicates mov r31=pr // save predicates
dtlb_fault: dtlb_fault:
mov r17=cr.iha // get virtual address of L3 PTE mov r17=cr.iha // get virtual address of PTE
movl r30=1f // load nested fault continuation point movl r30=1f // load nested fault continuation point
;; ;;
1: ld8 r18=[r17] // read L3 PTE 1: ld8 r18=[r17] // read *pte
;; ;;
mov b0=r29 mov b0=r29
tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
...@@ -306,7 +315,7 @@ dtlb_fault: ...@@ -306,7 +315,7 @@ dtlb_fault:
*/ */
dv_serialize_data dv_serialize_data
ld8 r19=[r17] // read L3 PTE again and see if same ld8 r19=[r17] // read *pte again and see if same
mov r20=PAGE_SHIFT<<2 // setup page size for purge mov r20=PAGE_SHIFT<<2 // setup page size for purge
;; ;;
cmp.ne p7,p0=r18,r19 cmp.ne p7,p0=r18,r19
...@@ -420,7 +429,7 @@ ENTRY(nested_dtlb_miss) ...@@ -420,7 +429,7 @@ ENTRY(nested_dtlb_miss)
* r30: continuation address * r30: continuation address
* r31: saved pr * r31: saved pr
* *
* Output: r17: physical address of L3 PTE of faulting address * Output: r17: physical address of PTE of faulting address
* r29: saved b0 * r29: saved b0
* r30: continuation address * r30: continuation address
* r31: saved pr * r31: saved pr
...@@ -450,33 +459,33 @@ ENTRY(nested_dtlb_miss) ...@@ -450,33 +459,33 @@ ENTRY(nested_dtlb_miss)
(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT (p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT
(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 (p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3
;; ;;
(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 (p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5
(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) (p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4]
cmp.eq p7,p6=0,r21 // unused address bits all zeroes? cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
shr.u r18=r22,PUD_SHIFT // shift L2 index into position shr.u r18=r22,PUD_SHIFT // shift pud index into position
#else #else
shr.u r18=r22,PMD_SHIFT // shift L3 index into position shr.u r18=r22,PMD_SHIFT // shift pmd index into position
#endif #endif
;; ;;
ld8 r17=[r17] // fetch the L1 entry (may be 0) ld8 r17=[r17] // get *pgd (may be 0)
;; ;;
(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? (p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL?
dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=p[u|m]d_offset(pgd,addr)
;; ;;
#ifdef CONFIG_PGTABLE_4 #ifdef CONFIG_PGTABLE_4
(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0) (p7) ld8 r17=[r17] // get *pud (may be 0)
shr.u r18=r22,PMD_SHIFT // shift L3 index into position shr.u r18=r22,PMD_SHIFT // shift pmd index into position
;; ;;
(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? (p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pud_present(*pud) == NULL?
dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr)
;; ;;
#endif #endif
(p7) ld8 r17=[r17] // fetch the L3 entry (may be 0) (p7) ld8 r17=[r17] // get *pmd (may be 0)
shr.u r19=r22,PAGE_SHIFT // shift L4 index into position shr.u r19=r22,PAGE_SHIFT // shift pte index into position
;; ;;
(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L3 entry NULL? (p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pmd_present(*pmd) == NULL?
dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L4 page table entry dep r17=r19,r17,3,(PAGE_SHIFT-3) // r17=pte_offset(pmd,addr);
(p6) br.cond.spnt page_fault (p6) br.cond.spnt page_fault
mov b0=r30 mov b0=r30
br.sptk.many b0 // return to continuation point br.sptk.many b0 // return to continuation point
......
...@@ -598,19 +598,6 @@ config ARCH_MEMORY_PROBE ...@@ -598,19 +598,6 @@ config ARCH_MEMORY_PROBE
def_bool y def_bool y
depends on MEMORY_HOTPLUG depends on MEMORY_HOTPLUG
# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
# reside on that node.
#
# This is a relatively temporary hack that should
# be able to go away when sparsemem is fully in
# place
config NODES_SPAN_OTHER_NODES
def_bool y
depends on NEED_MULTIPLE_NODES
config PPC_64K_PAGES config PPC_64K_PAGES
bool "64k page size" bool "64k page size"
depends on PPC64 depends on PPC64
......
...@@ -33,6 +33,8 @@ endif ...@@ -33,6 +33,8 @@ endif
export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
ifeq ($(CONFIG_PPC64),y) ifeq ($(CONFIG_PPC64),y)
OLDARCH := ppc64 OLDARCH := ppc64
SZ := 64 SZ := 64
...@@ -111,9 +113,6 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200 ...@@ -111,9 +113,6 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200
AFLAGS += $(cpu-as-y) AFLAGS += $(cpu-as-y)
CFLAGS += $(cpu-as-y) CFLAGS += $(cpu-as-y)
# Default to the common case.
KBUILD_DEFCONFIG := common_defconfig
head-y := arch/powerpc/kernel/head_32.o head-y := arch/powerpc/kernel/head_32.o
head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
...@@ -125,11 +124,11 @@ head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o ...@@ -125,11 +124,11 @@ head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
core-y += arch/powerpc/kernel/ \ core-y += arch/powerpc/kernel/ \
arch/$(OLDARCH)/kernel/ \
arch/powerpc/mm/ \ arch/powerpc/mm/ \
arch/powerpc/lib/ \ arch/powerpc/lib/ \
arch/powerpc/sysdev/ \ arch/powerpc/sysdev/ \
arch/powerpc/platforms/ arch/powerpc/platforms/
core-$(CONFIG_PPC32) += arch/ppc/kernel/
core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
core-$(CONFIG_XMON) += arch/powerpc/xmon/ core-$(CONFIG_XMON) += arch/powerpc/xmon/
core-$(CONFIG_APUS) += arch/ppc/amiga/ core-$(CONFIG_APUS) += arch/ppc/amiga/
...@@ -165,7 +164,7 @@ define archhelp ...@@ -165,7 +164,7 @@ define archhelp
@echo ' (your) ~/bin/installkernel or' @echo ' (your) ~/bin/installkernel or'
@echo ' (distribution) /sbin/installkernel or' @echo ' (distribution) /sbin/installkernel or'
@echo ' install to $$(INSTALL_PATH) and run lilo' @echo ' install to $$(INSTALL_PATH) and run lilo'
@echo ' *_defconfig - Select default config from arch/$(ARCH)/ppc/configs' @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
endef endef
archclean: archclean:
......
...@@ -14,43 +14,42 @@ ...@@ -14,43 +14,42 @@
.text .text
.globl _zimage_start .globl _zimage_start
_zimage_start: _zimage_start:
bl reloc_offset bl 1f
reloc_offset: 1:
mflr r0 mflr r0
lis r9,reloc_offset@ha lis r9,1b@ha
addi r9,r9,reloc_offset@l addi r9,r9,1b@l
subf. r0,r9,r0 subf. r0,r9,r0
beq clear_caches beq 3f
reloc_got2:
lis r9,__got2_start@ha lis r9,__got2_start@ha
addi r9,r9,__got2_start@l addi r9,r9,__got2_start@l
lis r8,__got2_end@ha lis r8,__got2_end@ha
addi r8,r8,__got2_end@l addi r8,r8,__got2_end@l
subf. r8,r9,r8 subf. r8,r9,r8
beq clear_caches beq 3f
srwi. r8,r8,2 srwi. r8,r8,2
mtctr r8 mtctr r8
add r9,r0,r9 add r9,r0,r9
reloc_got2_loop: 2:
lwz r8,0(r9) lwz r8,0(r9)
add r8,r8,r0 add r8,r8,r0
stw r8,0(r9) stw r8,0(r9)
addi r9,r9,4 addi r9,r9,4
bdnz reloc_got2_loop bdnz 2b
clear_caches: 3:
lis r9,_start@h lis r9,_start@h
add r9,r0,r9 add r9,r0,r9
lis r8,_etext@ha lis r8,_etext@ha
addi r8,r8,_etext@l addi r8,r8,_etext@l
add r8,r0,r8 add r8,r0,r8
1: dcbf r0,r9 4: dcbf r0,r9
icbi r0,r9 icbi r0,r9
addi r9,r9,0x20 addi r9,r9,0x20
cmplwi 0,r9,8 cmplwi 0,r9,8
blt 1b blt 4b
sync sync
isync isync
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.14-rc4 # Linux kernel version: 2.6.15-rc1
# Thu Oct 20 08:28:33 2005 # Fri Nov 18 16:23:24 2005
# #
CONFIG_PPC64=y
CONFIG_64BIT=y CONFIG_64BIT=y
CONFIG_PPC_MERGE=y
CONFIG_MMU=y CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_ISA_DMA=y CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=y CONFIG_COMPAT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_FORCE_MAX_ZONEORDER=13
#
# Processor support
#
# CONFIG_POWER4_ONLY is not set
CONFIG_POWER3=y
CONFIG_POWER4=y
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
CONFIG_SMP=y
CONFIG_NR_CPUS=32
# #
# Code maturity level options # Code maturity level options
...@@ -41,7 +56,7 @@ CONFIG_CPUSETS=y ...@@ -41,7 +56,7 @@ CONFIG_CPUSETS=y
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
# CONFIG_EMBEDDED is not set # CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_PRINTK=y CONFIG_PRINTK=y
CONFIG_BUG=y CONFIG_BUG=y
...@@ -67,78 +82,115 @@ CONFIG_MODVERSIONS=y ...@@ -67,78 +82,115 @@ CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y CONFIG_STOP_MACHINE=y
CONFIG_SYSVIPC_COMPAT=y
#
# Block layer
#
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
# #
# Platform support # Platform support
# #
# CONFIG_PPC_ISERIES is not set
CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_ISERIES is not set
# CONFIG_EMBEDDED6xx is not set
# CONFIG_APUS is not set
CONFIG_PPC_PSERIES=y CONFIG_PPC_PSERIES=y
CONFIG_PPC_BPA=y
CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC=y
CONFIG_PPC_PMAC64=y
CONFIG_PPC_MAPLE=y CONFIG_PPC_MAPLE=y
CONFIG_PPC=y # CONFIG_PPC_CELL is not set
CONFIG_PPC64=y
CONFIG_PPC_OF=y CONFIG_PPC_OF=y
CONFIG_XICS=y CONFIG_XICS=y
CONFIG_MPIC=y
CONFIG_BPA_IIC=y
CONFIG_ALTIVEC=y
CONFIG_PPC_SPLPAR=y
CONFIG_KEXEC=y
CONFIG_IBMVIO=y
CONFIG_U3_DART=y CONFIG_U3_DART=y
CONFIG_MPIC=y
CONFIG_PPC_RTAS=y
CONFIG_RTAS_ERROR_LOGGING=y
CONFIG_RTAS_PROC=y
CONFIG_RTAS_FLASH=m
# CONFIG_MMIO_NVRAM is not set
CONFIG_MPIC_BROKEN_U3=y CONFIG_MPIC_BROKEN_U3=y
CONFIG_PPC_PMAC64=y CONFIG_IBMVIO=y
CONFIG_BOOTX_TEXT=y # CONFIG_PPC_MPC106 is not set
# CONFIG_POWER4_ONLY is not set CONFIG_GENERIC_TBSYNC=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_PMAC64=y
# CONFIG_WANT_EARLY_SERIAL is not set
#
# Kernel options
#
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_FORCE_MAX_ZONEORDER=13
CONFIG_IOMMU_VMERGE=y CONFIG_IOMMU_VMERGE=y
CONFIG_SMP=y CONFIG_HOTPLUG_CPU=y
CONFIG_NR_CPUS=32 CONFIG_KEXEC=y
CONFIG_IRQ_ALL_CPUS=y
CONFIG_PPC_SPLPAR=y
CONFIG_EEH=y
CONFIG_SCANLOG=m
CONFIG_LPARCFG=y
# CONFIG_NUMA is not set
CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set # CONFIG_FLATMEM_MANUAL is not set
CONFIG_DISCONTIGMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y
CONFIG_DISCONTIGMEM=y CONFIG_SPARSEMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_NEED_MULTIPLE_NODES=y
# CONFIG_SPARSEMEM_STATIC is not set # CONFIG_SPARSEMEM_STATIC is not set
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_SPARSEMEM_EXTREME=y
CONFIG_NODES_SPAN_OTHER_NODES=y # CONFIG_MEMORY_HOTPLUG is not set
# CONFIG_NUMA is not set CONFIG_SPLIT_PTLOCK_CPUS=4096
# CONFIG_PPC_64K_PAGES is not set
# CONFIG_SCHED_SMT is not set # CONFIG_SCHED_SMT is not set
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_BKL is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_EEH=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_PPC_RTAS=y
CONFIG_RTAS_PROC=y
CONFIG_RTAS_FLASH=m
CONFIG_SCANLOG=m
CONFIG_LPARCFG=y
CONFIG_SECCOMP=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_HOTPLUG_CPU=y
CONFIG_PROC_DEVICETREE=y CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set # CONFIG_CMDLINE_BOOL is not set
# CONFIG_PM is not set
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y CONFIG_ISA_DMA_API=y
# #
# Bus Options # Bus options
# #
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PPC_I8259=y
# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_LEGACY_PROC is not set
...@@ -158,6 +210,7 @@ CONFIG_HOTPLUG_PCI=m ...@@ -158,6 +210,7 @@ CONFIG_HOTPLUG_PCI=m
# CONFIG_HOTPLUG_PCI_SHPC is not set # CONFIG_HOTPLUG_PCI_SHPC is not set
CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA=m
CONFIG_HOTPLUG_PCI_RPA_DLPAR=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
CONFIG_KERNEL_START=0xc000000000000000
# #
# Networking # Networking
...@@ -199,6 +252,10 @@ CONFIG_TCP_CONG_BIC=y ...@@ -199,6 +252,10 @@ CONFIG_TCP_CONG_BIC=y
# CONFIG_IPV6 is not set # CONFIG_IPV6 is not set
CONFIG_NETFILTER=y CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set # CONFIG_NETFILTER_DEBUG is not set
#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NETFILTER_NETLINK_LOG=m
...@@ -301,6 +358,10 @@ CONFIG_LLC=y ...@@ -301,6 +358,10 @@ CONFIG_LLC=y
# CONFIG_NET_DIVERT is not set # CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set # CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set # CONFIG_WAN_ROUTER is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set # CONFIG_NET_SCHED is not set
CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_ROUTE=y
...@@ -338,13 +399,7 @@ CONFIG_FW_LOADER=y ...@@ -338,13 +399,7 @@ CONFIG_FW_LOADER=y
# #
# Parallel port support # Parallel port support
# #
CONFIG_PARPORT=m # CONFIG_PARPORT is not set
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_1284 is not set
# #
# Plug and Play support # Plug and Play support
...@@ -354,7 +409,6 @@ CONFIG_PARPORT_PC=m ...@@ -354,7 +409,6 @@ CONFIG_PARPORT_PC=m
# Block devices # Block devices
# #
CONFIG_BLK_DEV_FD=y CONFIG_BLK_DEV_FD=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_DAC960 is not set
...@@ -370,14 +424,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 ...@@ -370,14 +424,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set # CONFIG_CDROM_PKTCDVD is not set
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_ATA_OVER_ETH is not set # CONFIG_ATA_OVER_ETH is not set
# #
...@@ -407,7 +453,7 @@ CONFIG_IDEPCI_SHARE_IRQ=y ...@@ -407,7 +453,7 @@ CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_SL82C105=y # CONFIG_BLK_DEV_SL82C105 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y CONFIG_IDEDMA_PCI_AUTO=y
...@@ -479,6 +525,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m ...@@ -479,6 +525,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
# #
# SCSI low-level drivers # SCSI low-level drivers
# #
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_ACARD is not set
...@@ -495,10 +542,12 @@ CONFIG_SCSI_SATA_SVW=y ...@@ -495,10 +542,12 @@ CONFIG_SCSI_SATA_SVW=y
# CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_ATA_PIIX is not set
# CONFIG_SCSI_SATA_MV is not set # CONFIG_SCSI_SATA_MV is not set
# CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_SATA_NV is not set
# CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_PDC_ADMA is not set
# CONFIG_SCSI_SATA_QSTOR is not set # CONFIG_SCSI_SATA_QSTOR is not set
# CONFIG_SCSI_SATA_PROMISE is not set
# CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SX4 is not set
# CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIL is not set
# CONFIG_SCSI_SATA_SIL24 is not set
# CONFIG_SCSI_SATA_SIS is not set # CONFIG_SCSI_SATA_SIS is not set
# CONFIG_SCSI_SATA_ULI is not set # CONFIG_SCSI_SATA_ULI is not set
# CONFIG_SCSI_SATA_VIA is not set # CONFIG_SCSI_SATA_VIA is not set
...@@ -512,8 +561,6 @@ CONFIG_SCSI_SATA_SVW=y ...@@ -512,8 +561,6 @@ CONFIG_SCSI_SATA_SVW=y
CONFIG_SCSI_IBMVSCSI=y CONFIG_SCSI_IBMVSCSI=y
# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
...@@ -608,6 +655,9 @@ CONFIG_IEEE1394_AMDTP=m ...@@ -608,6 +655,9 @@ CONFIG_IEEE1394_AMDTP=m
CONFIG_ADB_PMU=y CONFIG_ADB_PMU=y
CONFIG_PMAC_SMU=y CONFIG_PMAC_SMU=y
CONFIG_THERM_PM72=y CONFIG_THERM_PM72=y
CONFIG_WINDFARM=y
CONFIG_WINDFARM_PM81=y
CONFIG_WINDFARM_PM91=y
# #
# Network device support # Network device support
...@@ -664,7 +714,6 @@ CONFIG_E100=y ...@@ -664,7 +714,6 @@ CONFIG_E100=y
# CONFIG_EPIC100 is not set # CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set # CONFIG_SUNDANCE is not set
# CONFIG_VIA_RHINE is not set # CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set
# #
# Ethernet (1000 Mbit) # Ethernet (1000 Mbit)
...@@ -684,7 +733,6 @@ CONFIG_E1000=y ...@@ -684,7 +733,6 @@ CONFIG_E1000=y
# CONFIG_VIA_VELOCITY is not set # CONFIG_VIA_VELOCITY is not set
CONFIG_TIGON3=y CONFIG_TIGON3=y
# CONFIG_BNX2 is not set # CONFIG_BNX2 is not set
# CONFIG_SPIDER_NET is not set
# CONFIG_MV643XX_ETH is not set # CONFIG_MV643XX_ETH is not set
# #
...@@ -714,7 +762,6 @@ CONFIG_IBMOL=y ...@@ -714,7 +762,6 @@ CONFIG_IBMOL=y
# CONFIG_WAN is not set # CONFIG_WAN is not set
# CONFIG_FDDI is not set # CONFIG_FDDI is not set
# CONFIG_HIPPI is not set # CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m CONFIG_PPP=m
# CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set # CONFIG_PPP_FILTER is not set
...@@ -722,6 +769,7 @@ CONFIG_PPP_ASYNC=m ...@@ -722,6 +769,7 @@ CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m CONFIG_PPP_BSDCOMP=m
# CONFIG_PPP_MPPE is not set
CONFIG_PPPOE=m CONFIG_PPPOE=m
# CONFIG_SLIP is not set # CONFIG_SLIP is not set
# CONFIG_NET_FC is not set # CONFIG_NET_FC is not set
...@@ -784,7 +832,6 @@ CONFIG_INPUT_PCSPKR=m ...@@ -784,7 +832,6 @@ CONFIG_INPUT_PCSPKR=m
CONFIG_SERIO=y CONFIG_SERIO=y
CONFIG_SERIO_I8042=y CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set # CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set # CONFIG_SERIO_RAW is not set
...@@ -817,10 +864,6 @@ CONFIG_SERIAL_JSM=m ...@@ -817,10 +864,6 @@ CONFIG_SERIAL_JSM=m
CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set
CONFIG_HVC_CONSOLE=y CONFIG_HVC_CONSOLE=y
CONFIG_HVCS=m CONFIG_HVCS=m
...@@ -834,6 +877,7 @@ CONFIG_HVCS=m ...@@ -834,6 +877,7 @@ CONFIG_HVCS=m
# #
# CONFIG_WATCHDOG is not set # CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set # CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set # CONFIG_DTLK is not set
# CONFIG_R3964 is not set # CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set # CONFIG_APPLICOM is not set
...@@ -851,6 +895,7 @@ CONFIG_MAX_RAW_DEVS=256 ...@@ -851,6 +895,7 @@ CONFIG_MAX_RAW_DEVS=256
# TPM devices # TPM devices
# #
# CONFIG_TCG_TPM is not set # CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
# #
# I2C support # I2C support
...@@ -879,7 +924,6 @@ CONFIG_I2C_AMD8111=y ...@@ -879,7 +924,6 @@ CONFIG_I2C_AMD8111=y
CONFIG_I2C_KEYWEST=y CONFIG_I2C_KEYWEST=y
CONFIG_I2C_PMAC_SMU=y CONFIG_I2C_PMAC_SMU=y
# CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set # CONFIG_I2C_SAVAGE4 is not set
...@@ -904,6 +948,7 @@ CONFIG_I2C_PMAC_SMU=y ...@@ -904,6 +948,7 @@ CONFIG_I2C_PMAC_SMU=y
# CONFIG_SENSORS_PCF8591 is not set # CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_MAX6875 is not set
# CONFIG_RTC_X1205_I2C is not set
# CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_BUS is not set
...@@ -945,7 +990,6 @@ CONFIG_FB=y ...@@ -945,7 +990,6 @@ CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_SOFT_CURSOR=y
CONFIG_FB_MACMODES=y CONFIG_FB_MACMODES=y
CONFIG_FB_MODE_HELPERS=y CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y CONFIG_FB_TILEBLITTING=y
...@@ -960,6 +1004,7 @@ CONFIG_FB_OF=y ...@@ -960,6 +1004,7 @@ CONFIG_FB_OF=y
# CONFIG_FB_ASILIANT is not set # CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set # CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set # CONFIG_FB_VGA16 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set # CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set # CONFIG_FB_RIVA is not set
CONFIG_FB_MATROX=y CONFIG_FB_MATROX=y
...@@ -983,7 +1028,6 @@ CONFIG_FB_RADEON_I2C=y ...@@ -983,7 +1028,6 @@ CONFIG_FB_RADEON_I2C=y
# CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_CYBLA is not set # CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set # CONFIG_FB_TRIDENT is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set # CONFIG_FB_VIRTUAL is not set
# #
...@@ -992,6 +1036,7 @@ CONFIG_FB_RADEON_I2C=y ...@@ -992,6 +1036,7 @@ CONFIG_FB_RADEON_I2C=y
# CONFIG_VGA_CONSOLE is not set # CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set # CONFIG_FONTS is not set
CONFIG_FONT_8x8=y CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y CONFIG_FONT_8x16=y
...@@ -1012,7 +1057,94 @@ CONFIG_LCD_DEVICE=y ...@@ -1012,7 +1057,94 @@ CONFIG_LCD_DEVICE=y
# #
# Sound # Sound
# #
# CONFIG_SOUND is not set CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_GENERIC_DRIVER=y
#
# Generic devices
#
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
#
# PCI devices
#
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_HDA_INTEL is not set
#
# ALSA PowerMac devices
#
CONFIG_SND_POWERMAC=m
CONFIG_SND_POWERMAC_AUTO_DRC=y
#
# USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
# #
# USB support # USB support
...@@ -1046,12 +1178,16 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y ...@@ -1046,12 +1178,16 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# #
# USB Device Class drivers # USB Device Class drivers
# #
# CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
# CONFIG_USB_ACM is not set # CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set # CONFIG_USB_PRINTER is not set
# #
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
#
# may also be needed; see USB_STORAGE Help for more information
# #
CONFIG_USB_STORAGE=m CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DEBUG is not set
...@@ -1106,7 +1242,7 @@ CONFIG_USB_HIDDEV=y ...@@ -1106,7 +1242,7 @@ CONFIG_USB_HIDDEV=y
# #
# CONFIG_USB_CATC is not set # CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set # CONFIG_USB_KAWETH is not set
CONFIG_USB_PEGASUS=y # CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set # CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set # CONFIG_USB_USBNET is not set
# CONFIG_USB_MON is not set # CONFIG_USB_MON is not set
...@@ -1114,7 +1250,6 @@ CONFIG_USB_PEGASUS=y ...@@ -1114,7 +1250,6 @@ CONFIG_USB_PEGASUS=y
# #
# USB port drivers # USB port drivers
# #
# CONFIG_USB_USS720 is not set
# #
# USB Serial Converter support # USB Serial Converter support
...@@ -1163,6 +1298,7 @@ CONFIG_INFINIBAND_MTHCA=m ...@@ -1163,6 +1298,7 @@ CONFIG_INFINIBAND_MTHCA=m
# CONFIG_INFINIBAND_MTHCA_DEBUG is not set # CONFIG_INFINIBAND_MTHCA_DEBUG is not set
CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB=m
# CONFIG_INFINIBAND_IPOIB_DEBUG is not set # CONFIG_INFINIBAND_IPOIB_DEBUG is not set
# CONFIG_INFINIBAND_SRP is not set
# #
# SN Devices # SN Devices
...@@ -1358,10 +1494,25 @@ CONFIG_NLS_KOI8_U=m ...@@ -1358,10 +1494,25 @@ CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m CONFIG_NLS_UTF8=m
# #
# Profiling support # Library routines
#
CONFIG_CRC_CCITT=m
# CONFIG_CRC16 is not set
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
#
# Instrumentation Support
# #
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=y CONFIG_OPROFILE=y
# CONFIG_KPROBES is not set
# #
# Kernel hacking # Kernel hacking
...@@ -1378,14 +1529,15 @@ CONFIG_DETECT_SOFTLOCKUP=y ...@@ -1378,14 +1529,15 @@ CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_VM is not set
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_KPROBES is not set
CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUGGER=y CONFIG_DEBUGGER=y
CONFIG_XMON=y CONFIG_XMON=y
# CONFIG_XMON_DEFAULT is not set # CONFIG_XMON_DEFAULT is not set
# CONFIG_PPCDBG is not set
CONFIG_IRQSTACKS=y CONFIG_IRQSTACKS=y
CONFIG_BOOTX_TEXT=y
# #
# Security options # Security options
...@@ -1425,17 +1577,3 @@ CONFIG_CRYPTO_TEST=m ...@@ -1425,17 +1577,3 @@ CONFIG_CRYPTO_TEST=m
# #
# Hardware crypto devices # Hardware crypto devices
# #
#
# Library routines
#
CONFIG_CRC_CCITT=m
# CONFIG_CRC16 is not set
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
...@@ -165,7 +165,6 @@ CONFIG_SPARSEMEM_EXTREME=y ...@@ -165,7 +165,6 @@ CONFIG_SPARSEMEM_EXTREME=y
# CONFIG_MEMORY_HOTPLUG is not set # CONFIG_MEMORY_HOTPLUG is not set
CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_SPLIT_PTLOCK_CPUS=4096
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_NODES_SPAN_OTHER_NODES=y
# CONFIG_PPC_64K_PAGES is not set # CONFIG_PPC_64K_PAGES is not set
CONFIG_SCHED_SMT=y CONFIG_SCHED_SMT=y
CONFIG_PROC_DEVICETREE=y CONFIG_PROC_DEVICETREE=y
......
...@@ -12,12 +12,12 @@ CFLAGS_btext.o += -fPIC ...@@ -12,12 +12,12 @@ CFLAGS_btext.o += -fPIC
endif endif
obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
irq.o signal_32.o pmc.o vdso.o irq.o align.o signal_32.o pmc.o vdso.o
obj-y += vdso32/ obj-y += vdso32/
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
signal_64.o ptrace32.o systbl.o \ signal_64.o ptrace32.o systbl.o \
paca.o ioctl32.o cpu_setup_power4.o \ paca.o ioctl32.o cpu_setup_power4.o \
firmware.o sysfs.o udbg.o firmware.o sysfs.o udbg.o idle_64.o
obj-$(CONFIG_PPC64) += vdso64/ obj-$(CONFIG_PPC64) += vdso64/
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
obj-$(CONFIG_POWER4) += idle_power4.o obj-$(CONFIG_POWER4) += idle_power4.o
...@@ -35,6 +35,7 @@ obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o ...@@ -35,6 +35,7 @@ obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
udbgscc-$(CONFIG_PPC64) := udbg_scc.o udbgscc-$(CONFIG_PPC64) := udbg_scc.o
obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y) obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y)
obj64-$(CONFIG_PPC_MULTIPLATFORM) += nvram_64.o
ifeq ($(CONFIG_PPC_MERGE),y) ifeq ($(CONFIG_PPC_MERGE),y)
...@@ -78,5 +79,7 @@ smpobj-$(CONFIG_SMP) += smp.o ...@@ -78,5 +79,7 @@ smpobj-$(CONFIG_SMP) += smp.o
endif endif
obj-$(CONFIG_PPC64) += $(obj64-y)
extra-$(CONFIG_PPC_FPU) += fpu.o extra-$(CONFIG_PPC_FPU) += fpu.o
extra-$(CONFIG_PPC64) += entry_64.o extra-$(CONFIG_PPC64) += entry_64.o
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* PowerPC 403GCX/405GP modifications. * PowerPC 403GCX/405GP modifications.
* Copyright (c) 2001-2002 PPC64 team, IBM Corp * Copyright (c) 2001-2002 PPC64 team, IBM Corp
* 64-bit and Power4 support * 64-bit and Power4 support
* Copyright (c) 2005 Benjamin Herrenschmidt, IBM Corp
* <benh@kernel.crashing.org>
* Merge ppc32 and ppc64 implementations
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -38,10 +41,15 @@ struct aligninfo { ...@@ -38,10 +41,15 @@ struct aligninfo {
#define F 8 /* to/from fp regs */ #define F 8 /* to/from fp regs */
#define U 0x10 /* update index register */ #define U 0x10 /* update index register */
#define M 0x20 /* multiple load/store */ #define M 0x20 /* multiple load/store */
#define SW 0x40 /* byte swap */ #define SW 0x40 /* byte swap int or ... */
#define S 0x40 /* ... single-precision fp */
#define SX 0x40 /* byte count in XER */
#define HARD 0x80 /* string, stwcx. */
#define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */ #define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */
#define SWAP(a, b) (t = (a), (a) = (b), (b) = t)
/* /*
* The PowerPC stores certain bits of the instruction that caused the * The PowerPC stores certain bits of the instruction that caused the
* alignment exception in the DSISR register. This array maps those * alignment exception in the DSISR register. This array maps those
...@@ -57,14 +65,14 @@ static struct aligninfo aligninfo[128] = { ...@@ -57,14 +65,14 @@ static struct aligninfo aligninfo[128] = {
{ 2, LD+SE }, /* 00 0 0101: lha */ { 2, LD+SE }, /* 00 0 0101: lha */
{ 2, ST }, /* 00 0 0110: sth */ { 2, ST }, /* 00 0 0110: sth */
{ 4, LD+M }, /* 00 0 0111: lmw */ { 4, LD+M }, /* 00 0 0111: lmw */
{ 4, LD+F }, /* 00 0 1000: lfs */ { 4, LD+F+S }, /* 00 0 1000: lfs */
{ 8, LD+F }, /* 00 0 1001: lfd */ { 8, LD+F }, /* 00 0 1001: lfd */
{ 4, ST+F }, /* 00 0 1010: stfs */ { 4, ST+F+S }, /* 00 0 1010: stfs */
{ 8, ST+F }, /* 00 0 1011: stfd */ { 8, ST+F }, /* 00 0 1011: stfd */
INVALID, /* 00 0 1100 */ INVALID, /* 00 0 1100 */
{ 8, LD }, /* 00 0 1101: ld */ { 8, LD }, /* 00 0 1101: ld/ldu/lwa */
INVALID, /* 00 0 1110 */ INVALID, /* 00 0 1110 */
{ 8, ST }, /* 00 0 1111: std */ { 8, ST }, /* 00 0 1111: std/stdu */
{ 4, LD+U }, /* 00 1 0000: lwzu */ { 4, LD+U }, /* 00 1 0000: lwzu */
INVALID, /* 00 1 0001 */ INVALID, /* 00 1 0001 */
{ 4, ST+U }, /* 00 1 0010: stwu */ { 4, ST+U }, /* 00 1 0010: stwu */
...@@ -73,9 +81,9 @@ static struct aligninfo aligninfo[128] = { ...@@ -73,9 +81,9 @@ static struct aligninfo aligninfo[128] = {
{ 2, LD+SE+U }, /* 00 1 0101: lhau */ { 2, LD+SE+U }, /* 00 1 0101: lhau */
{ 2, ST+U }, /* 00 1 0110: sthu */ { 2, ST+U }, /* 00 1 0110: sthu */
{ 4, ST+M }, /* 00 1 0111: stmw */ { 4, ST+M }, /* 00 1 0111: stmw */
{ 4, LD+F+U }, /* 00 1 1000: lfsu */ { 4, LD+F+S+U }, /* 00 1 1000: lfsu */
{ 8, LD+F+U }, /* 00 1 1001: lfdu */ { 8, LD+F+U }, /* 00 1 1001: lfdu */
{ 4, ST+F+U }, /* 00 1 1010: stfsu */ { 4, ST+F+S+U }, /* 00 1 1010: stfsu */
{ 8, ST+F+U }, /* 00 1 1011: stfdu */ { 8, ST+F+U }, /* 00 1 1011: stfdu */
INVALID, /* 00 1 1100 */ INVALID, /* 00 1 1100 */
INVALID, /* 00 1 1101 */ INVALID, /* 00 1 1101 */
...@@ -89,10 +97,10 @@ static struct aligninfo aligninfo[128] = { ...@@ -89,10 +97,10 @@ static struct aligninfo aligninfo[128] = {
{ 4, LD+SE }, /* 01 0 0101: lwax */ { 4, LD+SE }, /* 01 0 0101: lwax */
INVALID, /* 01 0 0110 */ INVALID, /* 01 0 0110 */
INVALID, /* 01 0 0111 */ INVALID, /* 01 0 0111 */
{ 0, LD }, /* 01 0 1000: lswx */ { 4, LD+M+HARD+SX }, /* 01 0 1000: lswx */
{ 0, LD }, /* 01 0 1001: lswi */ { 4, LD+M+HARD }, /* 01 0 1001: lswi */
{ 0, ST }, /* 01 0 1010: stswx */ { 4, ST+M+HARD+SX }, /* 01 0 1010: stswx */
{ 0, ST }, /* 01 0 1011: stswi */ { 4, ST+M+HARD }, /* 01 0 1011: stswi */
INVALID, /* 01 0 1100 */ INVALID, /* 01 0 1100 */
{ 8, LD+U }, /* 01 0 1101: ldu */ { 8, LD+U }, /* 01 0 1101: ldu */
INVALID, /* 01 0 1110 */ INVALID, /* 01 0 1110 */
...@@ -115,7 +123,7 @@ static struct aligninfo aligninfo[128] = { ...@@ -115,7 +123,7 @@ static struct aligninfo aligninfo[128] = {
INVALID, /* 01 1 1111 */ INVALID, /* 01 1 1111 */
INVALID, /* 10 0 0000 */ INVALID, /* 10 0 0000 */
INVALID, /* 10 0 0001 */ INVALID, /* 10 0 0001 */
{ 0, ST }, /* 10 0 0010: stwcx. */ INVALID, /* 10 0 0010: stwcx. */
INVALID, /* 10 0 0011 */ INVALID, /* 10 0 0011 */
INVALID, /* 10 0 0100 */ INVALID, /* 10 0 0100 */
INVALID, /* 10 0 0101 */ INVALID, /* 10 0 0101 */
...@@ -144,7 +152,7 @@ static struct aligninfo aligninfo[128] = { ...@@ -144,7 +152,7 @@ static struct aligninfo aligninfo[128] = {
INVALID, /* 10 1 1100 */ INVALID, /* 10 1 1100 */
INVALID, /* 10 1 1101 */ INVALID, /* 10 1 1101 */
INVALID, /* 10 1 1110 */ INVALID, /* 10 1 1110 */
{ L1_CACHE_BYTES, ST }, /* 10 1 1111: dcbz */ { 0, ST+HARD }, /* 10 1 1111: dcbz */
{ 4, LD }, /* 11 0 0000: lwzx */ { 4, LD }, /* 11 0 0000: lwzx */
INVALID, /* 11 0 0001 */ INVALID, /* 11 0 0001 */
{ 4, ST }, /* 11 0 0010: stwx */ { 4, ST }, /* 11 0 0010: stwx */
...@@ -153,9 +161,9 @@ static struct aligninfo aligninfo[128] = { ...@@ -153,9 +161,9 @@ static struct aligninfo aligninfo[128] = {
{ 2, LD+SE }, /* 11 0 0101: lhax */ { 2, LD+SE }, /* 11 0 0101: lhax */
{ 2, ST }, /* 11 0 0110: sthx */ { 2, ST }, /* 11 0 0110: sthx */
INVALID, /* 11 0 0111 */ INVALID, /* 11 0 0111 */
{ 4, LD+F }, /* 11 0 1000: lfsx */ { 4, LD+F+S }, /* 11 0 1000: lfsx */
{ 8, LD+F }, /* 11 0 1001: lfdx */ { 8, LD+F }, /* 11 0 1001: lfdx */
{ 4, ST+F }, /* 11 0 1010: stfsx */ { 4, ST+F+S }, /* 11 0 1010: stfsx */
{ 8, ST+F }, /* 11 0 1011: stfdx */ { 8, ST+F }, /* 11 0 1011: stfdx */
INVALID, /* 11 0 1100 */ INVALID, /* 11 0 1100 */
{ 8, LD+M }, /* 11 0 1101: lmd */ { 8, LD+M }, /* 11 0 1101: lmd */
...@@ -169,9 +177,9 @@ static struct aligninfo aligninfo[128] = { ...@@ -169,9 +177,9 @@ static struct aligninfo aligninfo[128] = {
{ 2, LD+SE+U }, /* 11 1 0101: lhaux */ { 2, LD+SE+U }, /* 11 1 0101: lhaux */
{ 2, ST+U }, /* 11 1 0110: sthux */ { 2, ST+U }, /* 11 1 0110: sthux */
INVALID, /* 11 1 0111 */ INVALID, /* 11 1 0111 */
{ 4, LD+F+U }, /* 11 1 1000: lfsux */ { 4, LD+F+S+U }, /* 11 1 1000: lfsux */
{ 8, LD+F+U }, /* 11 1 1001: lfdux */ { 8, LD+F+U }, /* 11 1 1001: lfdux */
{ 4, ST+F+U }, /* 11 1 1010: stfsux */ { 4, ST+F+S+U }, /* 11 1 1010: stfsux */
{ 8, ST+F+U }, /* 11 1 1011: stfdux */ { 8, ST+F+U }, /* 11 1 1011: stfdux */
INVALID, /* 11 1 1100 */ INVALID, /* 11 1 1100 */
INVALID, /* 11 1 1101 */ INVALID, /* 11 1 1101 */
...@@ -179,45 +187,175 @@ static struct aligninfo aligninfo[128] = { ...@@ -179,45 +187,175 @@ static struct aligninfo aligninfo[128] = {
INVALID, /* 11 1 1111 */ INVALID, /* 11 1 1111 */
}; };
#define SWAP(a, b) (t = (a), (a) = (b), (b) = t) /*
* Create a DSISR value from the instruction
*/
static inline unsigned make_dsisr(unsigned instr) static inline unsigned make_dsisr(unsigned instr)
{ {
unsigned dsisr; unsigned dsisr;
/* create a DSISR value from the instruction */
dsisr = (instr & 0x03ff0000) >> 16; /* bits 6:15 --> 22:31 */ /* bits 6:15 --> 22:31 */
dsisr = (instr & 0x03ff0000) >> 16;
if ( IS_XFORM(instr) ) {
dsisr |= (instr & 0x00000006) << 14; /* bits 29:30 --> 15:16 */ if (IS_XFORM(instr)) {
dsisr |= (instr & 0x00000040) << 8; /* bit 25 --> 17 */ /* bits 29:30 --> 15:16 */
dsisr |= (instr & 0x00000780) << 3; /* bits 21:24 --> 18:21 */ dsisr |= (instr & 0x00000006) << 14;
/* bit 25 --> 17 */
dsisr |= (instr & 0x00000040) << 8;
/* bits 21:24 --> 18:21 */
dsisr |= (instr & 0x00000780) << 3;
} else {
/* bit 5 --> 17 */
dsisr |= (instr & 0x04000000) >> 12;
/* bits 1: 4 --> 18:21 */
dsisr |= (instr & 0x78000000) >> 17;
/* bits 30:31 --> 12:13 */
if (IS_DSFORM(instr))
dsisr |= (instr & 0x00000003) << 18;
} }
else {
dsisr |= (instr & 0x04000000) >> 12; /* bit 5 --> 17 */ return dsisr;
dsisr |= (instr & 0x78000000) >> 17; /* bits 1: 4 --> 18:21 */ }
if ( IS_DSFORM(instr) ) {
dsisr |= (instr & 0x00000003) << 18; /* bits 30:31 --> 12:13 */ /*
* The dcbz (data cache block zero) instruction
* gives an alignment fault if used on non-cacheable
* memory. We handle the fault mainly for the
* case when we are running with the cache disabled
* for debugging.
*/
static int emulate_dcbz(struct pt_regs *regs, unsigned char __user *addr)
{
long __user *p;
int i, size;
#ifdef __powerpc64__
size = ppc64_caches.dline_size;
#else
size = L1_CACHE_BYTES;
#endif
p = (long __user *) (regs->dar & -size);
if (user_mode(regs) && !access_ok(VERIFY_WRITE, p, size))
return -EFAULT;
for (i = 0; i < size / sizeof(long); ++i)
if (__put_user(0, p+i))
return -EFAULT;
return 1;
}
/*
* Emulate load & store multiple instructions
* On 64-bit machines, these instructions only affect/use the
* bottom 4 bytes of each register, and the loads clear the
* top 4 bytes of the affected register.
*/
#ifdef CONFIG_PPC64
#define REG_BYTE(rp, i) *((u8 *)((rp) + ((i) >> 2)) + ((i) & 3) + 4)
#else
#define REG_BYTE(rp, i) *((u8 *)(rp) + (i))
#endif
static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr,
unsigned int reg, unsigned int nb,
unsigned int flags, unsigned int instr)
{
unsigned long *rptr;
unsigned int nb0, i;
/*
* We do not try to emulate 8 bytes multiple as they aren't really
* available in our operating environments and we don't try to
* emulate multiples operations in kernel land as they should never
* be used/generated there at least not on unaligned boundaries
*/
if (unlikely((nb > 4) || !user_mode(regs)))
return 0;
/* lmw, stmw, lswi/x, stswi/x */
nb0 = 0;
if (flags & HARD) {
if (flags & SX) {
nb = regs->xer & 127;
if (nb == 0)
return 1;
} else {
if (__get_user(instr,
(unsigned int __user *)regs->nip))
return -EFAULT;
nb = (instr >> 11) & 0x1f;
if (nb == 0)
nb = 32;
} }
if (nb + reg * 4 > 128) {
nb0 = nb + reg * 4 - 128;
nb = 128 - reg * 4;
}
} else {
/* lwm, stmw */
nb = (32 - reg) * 4;
} }
return dsisr; if (!access_ok((flags & ST ? VERIFY_WRITE: VERIFY_READ), addr, nb+nb0))
return -EFAULT; /* bad address */
rptr = &regs->gpr[reg];
if (flags & LD) {
/*
* This zeroes the top 4 bytes of the affected registers
* in 64-bit mode, and also zeroes out any remaining
* bytes of the last register for lsw*.
*/
memset(rptr, 0, ((nb + 3) / 4) * sizeof(unsigned long));
if (nb0 > 0)
memset(&regs->gpr[0], 0,
((nb0 + 3) / 4) * sizeof(unsigned long));
for (i = 0; i < nb; ++i)
if (__get_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
if (nb0 > 0) {
rptr = &regs->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
if (__get_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
}
} else {
for (i = 0; i < nb; ++i)
if (__put_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
if (nb0 > 0) {
rptr = &regs->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
if (__put_user(REG_BYTE(rptr, i), addr + i))
return -EFAULT;
}
}
return 1;
} }
int
fix_alignment(struct pt_regs *regs) /*
* Called on alignment exception. Attempts to fixup
*
* Return 1 on success
* Return 0 if unable to handle the interrupt
* Return -EFAULT if data address is bad
*/
int fix_alignment(struct pt_regs *regs)
{ {
unsigned int instr, nb, flags; unsigned int instr, nb, flags;
int t; unsigned int reg, areg;
unsigned long reg, areg; unsigned int dsisr;
unsigned long i;
int ret;
unsigned dsisr;
unsigned char __user *addr; unsigned char __user *addr;
unsigned char __user *p; unsigned char __user *p;
unsigned long __user *lp; int ret, t;
union { union {
long ll; u64 ll;
double dd; double dd;
unsigned char v[8]; unsigned char v[8];
struct { struct {
...@@ -231,18 +369,22 @@ fix_alignment(struct pt_regs *regs) ...@@ -231,18 +369,22 @@ fix_alignment(struct pt_regs *regs)
} data; } data;
/* /*
* Return 1 on success * We require a complete register set, if not, then our assembly
* Return 0 if unable to handle the interrupt * is broken
* Return -EFAULT if data address is bad
*/ */
CHECK_FULL_REGS(regs);
dsisr = regs->dsisr; dsisr = regs->dsisr;
/* Some processors don't provide us with a DSISR we can use here,
* let's make one up from the instruction
*/
if (cpu_has_feature(CPU_FTR_NODSISRALIGN)) { if (cpu_has_feature(CPU_FTR_NODSISRALIGN)) {
unsigned int real_instr; unsigned int real_instr;
if (__get_user(real_instr, (unsigned int __user *)regs->nip)) if (unlikely(__get_user(real_instr,
return 0; (unsigned int __user *)regs->nip)))
dsisr = make_dsisr(real_instr); return -EFAULT;
dsisr = make_dsisr(real_instr);
} }
/* extract the operation and registers from the dsisr */ /* extract the operation and registers from the dsisr */
...@@ -258,33 +400,37 @@ fix_alignment(struct pt_regs *regs) ...@@ -258,33 +400,37 @@ fix_alignment(struct pt_regs *regs)
/* DAR has the operand effective address */ /* DAR has the operand effective address */
addr = (unsigned char __user *)regs->dar; addr = (unsigned char __user *)regs->dar;
/* A size of 0 indicates an instruction we don't support */ /* A size of 0 indicates an instruction we don't support, with
/* we also don't support the multiples (lmw, stmw, lmd, stmd) */ * the exception of DCBZ which is handled as a special case here
if ((nb == 0) || (flags & M))
return 0; /* too hard or invalid instruction */
/*
* Special handling for dcbz
* dcbz may give an alignment exception for accesses to caching inhibited
* storage
*/ */
if (instr == DCBZ) if (instr == DCBZ)
addr = (unsigned char __user *) ((unsigned long)addr & -L1_CACHE_BYTES); return emulate_dcbz(regs, addr);
if (unlikely(nb == 0))
return 0;
/* Load/Store Multiple instructions are handled in their own
* function
*/
if (flags & M)
return emulate_multiple(regs, addr, reg, nb, flags, instr);
/* Verify the address of the operand */ /* Verify the address of the operand */
if (user_mode(regs)) { if (unlikely(user_mode(regs) &&
if (!access_ok((flags & ST? VERIFY_WRITE: VERIFY_READ), addr, nb)) !access_ok((flags & ST ? VERIFY_WRITE : VERIFY_READ),
return -EFAULT; /* bad address */ addr, nb)))
} return -EFAULT;
/* Force the fprs into the save area so we can reference them */ /* Force the fprs into the save area so we can reference them */
if (flags & F) { if (flags & F) {
if (!user_mode(regs)) /* userland only */
if (unlikely(!user_mode(regs)))
return 0; return 0;
flush_fp_to_thread(current); flush_fp_to_thread(current);
} }
/* If we are loading, get the data from user space */ /* If we are loading, get the data from user space, else
* get it from register values
*/
if (flags & LD) { if (flags & LD) {
data.ll = 0; data.ll = 0;
ret = 0; ret = 0;
...@@ -301,75 +447,62 @@ fix_alignment(struct pt_regs *regs) ...@@ -301,75 +447,62 @@ fix_alignment(struct pt_regs *regs)
case 2: case 2:
ret |= __get_user(data.v[6], p++); ret |= __get_user(data.v[6], p++);
ret |= __get_user(data.v[7], p++); ret |= __get_user(data.v[7], p++);
if (ret) if (unlikely(ret))
return -EFAULT; return -EFAULT;
} }
} } else if (flags & F)
data.dd = current->thread.fpr[reg];
/* If we are storing, get the data from the saved gpr or fpr */ else
if (flags & ST) { data.ll = regs->gpr[reg];
if (flags & F) {
if (nb == 4) { /* Perform other misc operations like sign extension, byteswap,
/* Doing stfs, have to convert to single */ * or floating point single precision conversion
preempt_disable(); */
enable_kernel_fp(); switch (flags & ~U) {
cvt_df(&current->thread.fpr[reg], (float *)&data.v[4], &current->thread); case LD+SE: /* sign extend */
disable_kernel_fp();
preempt_enable();
}
else
data.dd = current->thread.fpr[reg];
}
else
data.ll = regs->gpr[reg];
}
/* Swap bytes as needed */
if (flags & SW) {
if (nb == 2)
SWAP(data.v[6], data.v[7]);
else { /* nb must be 4 */
SWAP(data.v[4], data.v[7]);
SWAP(data.v[5], data.v[6]);
}
}
/* Sign extend as needed */
if (flags & SE) {
if ( nb == 2 ) if ( nb == 2 )
data.ll = data.x16.low16; data.ll = data.x16.low16;
else /* nb must be 4 */ else /* nb must be 4 */
data.ll = data.x32.low32; data.ll = data.x32.low32;
} break;
case LD+S: /* byte-swap */
/* If we are loading, move the data to the gpr or fpr */ case ST+S:
if (flags & LD) { if (nb == 2) {
if (flags & F) { SWAP(data.v[6], data.v[7]);
if (nb == 4) { } else {
/* Doing lfs, have to convert to double */ SWAP(data.v[4], data.v[7]);
preempt_disable(); SWAP(data.v[5], data.v[6]);
enable_kernel_fp();
cvt_fd((float *)&data.v[4], &current->thread.fpr[reg], &current->thread);
disable_kernel_fp();
preempt_enable();
}
else
current->thread.fpr[reg] = data.dd;
} }
else break;
regs->gpr[reg] = data.ll;
/* Single-precision FP load and store require conversions... */
case LD+F+S:
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
cvt_fd((float *)&data.v[4], &data.dd, &current->thread);
preempt_enable();
#else
return 0;
#endif
break;
case ST+F+S:
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
cvt_df(&data.dd, (float *)&data.v[4], &current->thread);
preempt_enable();
#else
return 0;
#endif
break;
} }
/* If we are storing, copy the data to the user */ /* Store result to memory or update registers */
if (flags & ST) { if (flags & ST) {
ret = 0; ret = 0;
p = addr; p = addr;
switch (nb) { switch (nb) {
case 128: /* Special case - must be dcbz */
lp = (unsigned long __user *)p;
for (i = 0; i < L1_CACHE_BYTES / sizeof(long); ++i)
ret |= __put_user(0, lp++);
break;
case 8: case 8:
ret |= __put_user(data.v[0], p++); ret |= __put_user(data.v[0], p++);
ret |= __put_user(data.v[1], p++); ret |= __put_user(data.v[1], p++);
...@@ -382,15 +515,16 @@ fix_alignment(struct pt_regs *regs) ...@@ -382,15 +515,16 @@ fix_alignment(struct pt_regs *regs)
ret |= __put_user(data.v[6], p++); ret |= __put_user(data.v[6], p++);
ret |= __put_user(data.v[7], p++); ret |= __put_user(data.v[7], p++);
} }
if (ret) if (unlikely(ret))
return -EFAULT; return -EFAULT;
} } else if (flags & F)
current->thread.fpr[reg] = data.dd;
else
regs->gpr[reg] = data.ll;
/* Update RA as needed */ /* Update RA as needed */
if (flags & U) { if (flags & U)
regs->gpr[areg] = regs->dar; regs->gpr[areg] = regs->dar;
}
return 1; return 1;
} }
...@@ -27,14 +27,6 @@ ...@@ -27,14 +27,6 @@
.text .text
.align 5
_GLOBAL(__delay)
cmpwi 0,r3,0
mtctr r3
beqlr
1: bdnz 1b
blr
/* /*
* This returns the high 64 bits of the product of two 64-bit numbers. * This returns the high 64 bits of the product of two 64-bit numbers.
*/ */
......
...@@ -15,7 +15,7 @@ unsigned long __init rtas_get_boot_time(void) ...@@ -15,7 +15,7 @@ unsigned long __init rtas_get_boot_time(void)
{ {
int ret[8]; int ret[8];
int error, wait_time; int error, wait_time;
unsigned long max_wait_tb; u64 max_wait_tb;
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
do { do {
...@@ -45,7 +45,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) ...@@ -45,7 +45,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
{ {
int ret[8]; int ret[8];
int error, wait_time; int error, wait_time;
unsigned long max_wait_tb; u64 max_wait_tb;
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
do { do {
...@@ -80,7 +80,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) ...@@ -80,7 +80,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
int rtas_set_rtc_time(struct rtc_time *tm) int rtas_set_rtc_time(struct rtc_time *tm)
{ {
int error, wait_time; int error, wait_time;
unsigned long max_wait_tb; u64 max_wait_tb;
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
do { do {
......
...@@ -130,6 +130,34 @@ unsigned long tb_last_stamp; ...@@ -130,6 +130,34 @@ unsigned long tb_last_stamp;
*/ */
DEFINE_PER_CPU(unsigned long, last_jiffy); DEFINE_PER_CPU(unsigned long, last_jiffy);
void __delay(unsigned long loops)
{
unsigned long start;
int diff;
if (__USE_RTC()) {
start = get_rtcl();
do {
/* the RTCL register wraps at 1000000000 */
diff = get_rtcl() - start;
if (diff < 0)
diff += 1000000000;
} while (diff < loops);
} else {
start = get_tbl();
while (get_tbl() - start < loops)
HMT_low();
HMT_medium();
}
}
EXPORT_SYMBOL(__delay);
void udelay(unsigned long usecs)
{
__delay(tb_ticks_per_usec * usecs);
}
EXPORT_SYMBOL(udelay);
static __inline__ void timer_check_rtc(void) static __inline__ void timer_check_rtc(void)
{ {
/* /*
......
...@@ -257,6 +257,13 @@ void __init chrp_setup_arch(void) ...@@ -257,6 +257,13 @@ void __init chrp_setup_arch(void)
if (rtas_token("display-character") >= 0) if (rtas_token("display-character") >= 0)
ppc_md.progress = rtas_progress; ppc_md.progress = rtas_progress;
/* use RTAS time-of-day routines if available */
if (rtas_token("get-time-of-day") != RTAS_UNKNOWN_SERVICE) {
ppc_md.get_boot_time = rtas_get_boot_time;
ppc_md.get_rtc_time = rtas_get_rtc_time;
ppc_md.set_rtc_time = rtas_set_rtc_time;
}
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
if (ppc_md.progress == NULL && boot_text_mapped) if (ppc_md.progress == NULL && boot_text_mapped)
ppc_md.progress = btext_progress; ppc_md.progress = btext_progress;
...@@ -505,9 +512,11 @@ void __init chrp_init(void) ...@@ -505,9 +512,11 @@ void __init chrp_init(void)
ppc_md.halt = rtas_halt; ppc_md.halt = rtas_halt;
ppc_md.time_init = chrp_time_init; ppc_md.time_init = chrp_time_init;
ppc_md.calibrate_decr = chrp_calibrate_decr;
/* this may get overridden with rtas routines later... */
ppc_md.set_rtc_time = chrp_set_rtc_time; ppc_md.set_rtc_time = chrp_set_rtc_time;
ppc_md.get_rtc_time = chrp_get_rtc_time; ppc_md.get_rtc_time = chrp_get_rtc_time;
ppc_md.calibrate_decr = chrp_calibrate_decr;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
smp_ops = &chrp_smp_ops; smp_ops = &chrp_smp_ops;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/mpic.h> #include <asm/mpic.h>
#include <asm/rtas.h>
static void __devinit smp_chrp_kick_cpu(int nr) static void __devinit smp_chrp_kick_cpu(int nr)
{ {
......
...@@ -87,7 +87,6 @@ int chrp_set_rtc_time(struct rtc_time *tmarg) ...@@ -87,7 +87,6 @@ int chrp_set_rtc_time(struct rtc_time *tmarg)
chrp_cmos_clock_write((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); chrp_cmos_clock_write((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
tm.tm_year -= 1900;
if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
BIN_TO_BCD(tm.tm_sec); BIN_TO_BCD(tm.tm_sec);
BIN_TO_BCD(tm.tm_min); BIN_TO_BCD(tm.tm_min);
...@@ -156,7 +155,7 @@ void chrp_get_rtc_time(struct rtc_time *tm) ...@@ -156,7 +155,7 @@ void chrp_get_rtc_time(struct rtc_time *tm)
BCD_TO_BIN(mon); BCD_TO_BIN(mon);
BCD_TO_BIN(year); BCD_TO_BIN(year);
} }
if ((year += 1900) < 1970) if (year < 70)
year += 100; year += 100;
tm->tm_sec = sec; tm->tm_sec = sec;
tm->tm_min = min; tm->tm_min = min;
......
...@@ -158,6 +158,11 @@ int maple_set_rtc_time(struct rtc_time *tm) ...@@ -158,6 +158,11 @@ int maple_set_rtc_time(struct rtc_time *tm)
return 0; return 0;
} }
static struct resource rtc_iores = {
.name = "rtc",
.flags = IORESOURCE_BUSY,
};
unsigned long __init maple_get_boot_time(void) unsigned long __init maple_get_boot_time(void)
{ {
struct rtc_time tm; struct rtc_time tm;
...@@ -172,7 +177,11 @@ unsigned long __init maple_get_boot_time(void) ...@@ -172,7 +177,11 @@ unsigned long __init maple_get_boot_time(void)
printk(KERN_INFO "Maple: No device node for RTC, assuming " printk(KERN_INFO "Maple: No device node for RTC, assuming "
"legacy address (0x%x)\n", maple_rtc_addr); "legacy address (0x%x)\n", maple_rtc_addr);
} }
rtc_iores.start = maple_rtc_addr;
rtc_iores.end = maple_rtc_addr + 7;
request_resource(&ioport_resource, &rtc_iores);
maple_get_rtc_time(&tm); maple_get_rtc_time(&tm);
return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec); tm.tm_hour, tm.tm_min, tm.tm_sec);
......
...@@ -86,7 +86,8 @@ static int ibm_read_slot_reset_state; ...@@ -86,7 +86,8 @@ static int ibm_read_slot_reset_state;
static int ibm_read_slot_reset_state2; static int ibm_read_slot_reset_state2;
static int ibm_slot_error_detail; static int ibm_slot_error_detail;
static int eeh_subsystem_enabled; int eeh_subsystem_enabled;
EXPORT_SYMBOL(eeh_subsystem_enabled);
/* Lock to avoid races due to multiple reports of an error */ /* Lock to avoid races due to multiple reports of an error */
static DEFINE_SPINLOCK(confirm_error_lock); static DEFINE_SPINLOCK(confirm_error_lock);
......
...@@ -504,7 +504,7 @@ static void pseries_dedicated_idle(void) ...@@ -504,7 +504,7 @@ static void pseries_dedicated_idle(void)
lpaca->lppaca.idle = 1; lpaca->lppaca.idle = 1;
if (!need_resched()) { if (!need_resched()) {
start_snooze = __get_tb() + start_snooze = get_tb() +
*smt_snooze_delay * tb_ticks_per_usec; *smt_snooze_delay * tb_ticks_per_usec;
while (!need_resched() && !cpu_is_offline(cpu)) { while (!need_resched() && !cpu_is_offline(cpu)) {
...@@ -518,7 +518,7 @@ static void pseries_dedicated_idle(void) ...@@ -518,7 +518,7 @@ static void pseries_dedicated_idle(void)
HMT_very_low(); HMT_very_low();
if (*smt_snooze_delay != 0 && if (*smt_snooze_delay != 0 &&
__get_tb() > start_snooze) { get_tb() > start_snooze) {
HMT_medium(); HMT_medium();
dedicated_idle_sleep(cpu); dedicated_idle_sleep(cpu);
} }
......
...@@ -13,7 +13,7 @@ extra-$(CONFIG_POWER4) += idle_power4.o ...@@ -13,7 +13,7 @@ extra-$(CONFIG_POWER4) += idle_power4.o
extra-y += vmlinux.lds extra-y += vmlinux.lds
obj-y := entry.o traps.o idle.o time.o misc.o \ obj-y := entry.o traps.o idle.o time.o misc.o \
process.o align.o \ process.o \
setup.o \ setup.o \
ppc_htab.o ppc_htab.o
obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
...@@ -38,7 +38,7 @@ endif ...@@ -38,7 +38,7 @@ endif
# These are here while we do the architecture merge # These are here while we do the architecture merge
else else
obj-y := idle.o align.o obj-y := idle.o
obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += module.o
......
/*
* align.c - handle alignment exceptions for the Power PC.
*
* Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
* Copyright (c) 1998-1999 TiVo, Inc.
* PowerPC 403GCX modifications.
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
* PowerPC 403GCX/405GP modifications.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/cache.h>
struct aligninfo {
unsigned char len;
unsigned char flags;
};
#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RA(inst) (((inst) & 0x001F0000) >> 16)
#define IS_XFORM(code) ((code) == 31)
#endif
#define INVALID { 0, 0 }
#define LD 1 /* load */
#define ST 2 /* store */
#define SE 4 /* sign-extend value */
#define F 8 /* to/from fp regs */
#define U 0x10 /* update index register */
#define M 0x20 /* multiple load/store */
#define S 0x40 /* single-precision fp, or byte-swap value */
#define SX 0x40 /* byte count in XER */
#define HARD 0x80 /* string, stwcx. */
#define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */
/*
* The PowerPC stores certain bits of the instruction that caused the
* alignment exception in the DSISR register. This array maps those
* bits to information about the operand length and what the
* instruction would do.
*/
static struct aligninfo aligninfo[128] = {
{ 4, LD }, /* 00 0 0000: lwz / lwarx */
INVALID, /* 00 0 0001 */
{ 4, ST }, /* 00 0 0010: stw */
INVALID, /* 00 0 0011 */
{ 2, LD }, /* 00 0 0100: lhz */
{ 2, LD+SE }, /* 00 0 0101: lha */
{ 2, ST }, /* 00 0 0110: sth */
{ 4, LD+M }, /* 00 0 0111: lmw */
{ 4, LD+F+S }, /* 00 0 1000: lfs */
{ 8, LD+F }, /* 00 0 1001: lfd */
{ 4, ST+F+S }, /* 00 0 1010: stfs */
{ 8, ST+F }, /* 00 0 1011: stfd */
INVALID, /* 00 0 1100 */
INVALID, /* 00 0 1101: ld/ldu/lwa */
INVALID, /* 00 0 1110 */
INVALID, /* 00 0 1111: std/stdu */
{ 4, LD+U }, /* 00 1 0000: lwzu */
INVALID, /* 00 1 0001 */
{ 4, ST+U }, /* 00 1 0010: stwu */
INVALID, /* 00 1 0011 */
{ 2, LD+U }, /* 00 1 0100: lhzu */
{ 2, LD+SE+U }, /* 00 1 0101: lhau */
{ 2, ST+U }, /* 00 1 0110: sthu */
{ 4, ST+M }, /* 00 1 0111: stmw */
{ 4, LD+F+S+U }, /* 00 1 1000: lfsu */
{ 8, LD+F+U }, /* 00 1 1001: lfdu */
{ 4, ST+F+S+U }, /* 00 1 1010: stfsu */
{ 8, ST+F+U }, /* 00 1 1011: stfdu */
INVALID, /* 00 1 1100 */
INVALID, /* 00 1 1101 */
INVALID, /* 00 1 1110 */
INVALID, /* 00 1 1111 */
INVALID, /* 01 0 0000: ldx */
INVALID, /* 01 0 0001 */
INVALID, /* 01 0 0010: stdx */
INVALID, /* 01 0 0011 */
INVALID, /* 01 0 0100 */
INVALID, /* 01 0 0101: lwax */
INVALID, /* 01 0 0110 */
INVALID, /* 01 0 0111 */
{ 4, LD+M+HARD+SX }, /* 01 0 1000: lswx */
{ 4, LD+M+HARD }, /* 01 0 1001: lswi */
{ 4, ST+M+HARD+SX }, /* 01 0 1010: stswx */
{ 4, ST+M+HARD }, /* 01 0 1011: stswi */
INVALID, /* 01 0 1100 */
INVALID, /* 01 0 1101 */
INVALID, /* 01 0 1110 */
INVALID, /* 01 0 1111 */
INVALID, /* 01 1 0000: ldux */
INVALID, /* 01 1 0001 */
INVALID, /* 01 1 0010: stdux */
INVALID, /* 01 1 0011 */
INVALID, /* 01 1 0100 */
INVALID, /* 01 1 0101: lwaux */
INVALID, /* 01 1 0110 */
INVALID, /* 01 1 0111 */
INVALID, /* 01 1 1000 */
INVALID, /* 01 1 1001 */
INVALID, /* 01 1 1010 */
INVALID, /* 01 1 1011 */
INVALID, /* 01 1 1100 */
INVALID, /* 01 1 1101 */
INVALID, /* 01 1 1110 */
INVALID, /* 01 1 1111 */
INVALID, /* 10 0 0000 */
INVALID, /* 10 0 0001 */
{ 0, ST+HARD }, /* 10 0 0010: stwcx. */
INVALID, /* 10 0 0011 */
INVALID, /* 10 0 0100 */
INVALID, /* 10 0 0101 */
INVALID, /* 10 0 0110 */
INVALID, /* 10 0 0111 */
{ 4, LD+S }, /* 10 0 1000: lwbrx */
INVALID, /* 10 0 1001 */
{ 4, ST+S }, /* 10 0 1010: stwbrx */
INVALID, /* 10 0 1011 */
{ 2, LD+S }, /* 10 0 1100: lhbrx */
INVALID, /* 10 0 1101 */
{ 2, ST+S }, /* 10 0 1110: sthbrx */
INVALID, /* 10 0 1111 */
INVALID, /* 10 1 0000 */
INVALID, /* 10 1 0001 */
INVALID, /* 10 1 0010 */
INVALID, /* 10 1 0011 */
INVALID, /* 10 1 0100 */
INVALID, /* 10 1 0101 */
INVALID, /* 10 1 0110 */
INVALID, /* 10 1 0111 */
INVALID, /* 10 1 1000 */
INVALID, /* 10 1 1001 */
INVALID, /* 10 1 1010 */
INVALID, /* 10 1 1011 */
INVALID, /* 10 1 1100 */
INVALID, /* 10 1 1101 */
INVALID, /* 10 1 1110 */
{ 0, ST+HARD }, /* 10 1 1111: dcbz */
{ 4, LD }, /* 11 0 0000: lwzx */
INVALID, /* 11 0 0001 */
{ 4, ST }, /* 11 0 0010: stwx */
INVALID, /* 11 0 0011 */
{ 2, LD }, /* 11 0 0100: lhzx */
{ 2, LD+SE }, /* 11 0 0101: lhax */
{ 2, ST }, /* 11 0 0110: sthx */
INVALID, /* 11 0 0111 */
{ 4, LD+F+S }, /* 11 0 1000: lfsx */
{ 8, LD+F }, /* 11 0 1001: lfdx */
{ 4, ST+F+S }, /* 11 0 1010: stfsx */
{ 8, ST+F }, /* 11 0 1011: stfdx */
INVALID, /* 11 0 1100 */
INVALID, /* 11 0 1101: lmd */
INVALID, /* 11 0 1110 */
INVALID, /* 11 0 1111: stmd */
{ 4, LD+U }, /* 11 1 0000: lwzux */
INVALID, /* 11 1 0001 */
{ 4, ST+U }, /* 11 1 0010: stwux */
INVALID, /* 11 1 0011 */
{ 2, LD+U }, /* 11 1 0100: lhzux */
{ 2, LD+SE+U }, /* 11 1 0101: lhaux */
{ 2, ST+U }, /* 11 1 0110: sthux */
INVALID, /* 11 1 0111 */
{ 4, LD+F+S+U }, /* 11 1 1000: lfsux */
{ 8, LD+F+U }, /* 11 1 1001: lfdux */
{ 4, ST+F+S+U }, /* 11 1 1010: stfsux */
{ 8, ST+F+U }, /* 11 1 1011: stfdux */
INVALID, /* 11 1 1100 */
INVALID, /* 11 1 1101 */
INVALID, /* 11 1 1110 */
INVALID, /* 11 1 1111 */
};
#define SWAP(a, b) (t = (a), (a) = (b), (b) = t)
int
fix_alignment(struct pt_regs *regs)
{
int instr, nb, flags;
#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
int opcode, f1, f2, f3;
#endif
int i, t;
int reg, areg;
int offset, nb0;
unsigned char __user *addr;
unsigned char *rptr;
union {
long l;
float f;
double d;
unsigned char v[8];
} data;
CHECK_FULL_REGS(regs);
#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
/* The 4xx-family & Book-E processors have no DSISR register,
* so we emulate it.
* The POWER4 has a DSISR register but doesn't set it on
* an alignment fault. -- paulus
*/
if (__get_user(instr, (unsigned int __user *) regs->nip))
return 0;
opcode = OPCD(instr);
reg = RS(instr);
areg = RA(instr);
if (!IS_XFORM(opcode)) {
f1 = 0;
f2 = (instr & 0x04000000) >> 26;
f3 = (instr & 0x78000000) >> 27;
} else {
f1 = (instr & 0x00000006) >> 1;
f2 = (instr & 0x00000040) >> 6;
f3 = (instr & 0x00000780) >> 7;
}
instr = ((f1 << 5) | (f2 << 4) | f3);
#else
reg = (regs->dsisr >> 5) & 0x1f; /* source/dest register */
areg = regs->dsisr & 0x1f; /* register to update */
instr = (regs->dsisr >> 10) & 0x7f;
#endif
nb = aligninfo[instr].len;
if (nb == 0) {
long __user *p;
int i;
if (instr != DCBZ)
return 0; /* too hard or invalid instruction */
/*
* The dcbz (data cache block zero) instruction
* gives an alignment fault if used on non-cacheable
* memory. We handle the fault mainly for the
* case when we are running with the cache disabled
* for debugging.
*/
p = (long __user *) (regs->dar & -L1_CACHE_BYTES);
if (user_mode(regs)
&& !access_ok(VERIFY_WRITE, p, L1_CACHE_BYTES))
return -EFAULT;
for (i = 0; i < L1_CACHE_BYTES / sizeof(long); ++i)
if (__put_user(0, p+i))
return -EFAULT;
return 1;
}
flags = aligninfo[instr].flags;
if ((flags & (LD|ST)) == 0)
return 0;
/* For the 4xx-family & Book-E processors, the 'dar' field of the
* pt_regs structure is overloaded and is really from the DEAR.
*/
addr = (unsigned char __user *)regs->dar;
if (flags & M) {
/* lmw, stmw, lswi/x, stswi/x */
nb0 = 0;
if (flags & HARD) {
if (flags & SX) {
nb = regs->xer & 127;
if (nb == 0)
return 1;
} else {
if (__get_user(instr,
(unsigned int __user *)regs->nip))
return 0;
nb = (instr >> 11) & 0x1f;
if (nb == 0)
nb = 32;
}
if (nb + reg * 4 > 128) {
nb0 = nb + reg * 4 - 128;
nb = 128 - reg * 4;
}
} else {
/* lwm, stmw */
nb = (32 - reg) * 4;
}
if (!access_ok((flags & ST? VERIFY_WRITE: VERIFY_READ), addr, nb+nb0))
return -EFAULT; /* bad address */
rptr = (unsigned char *) &regs->gpr[reg];
if (flags & LD) {
for (i = 0; i < nb; ++i)
if (__get_user(rptr[i], addr+i))
return -EFAULT;
if (nb0 > 0) {
rptr = (unsigned char *) &regs->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
if (__get_user(rptr[i], addr+i))
return -EFAULT;
}
for (; (i & 3) != 0; ++i)
rptr[i] = 0;
} else {
for (i = 0; i < nb; ++i)
if (__put_user(rptr[i], addr+i))
return -EFAULT;
if (nb0 > 0) {
rptr = (unsigned char *) &regs->gpr[0];
addr += nb;
for (i = 0; i < nb0; ++i)
if (__put_user(rptr[i], addr+i))
return -EFAULT;
}
}
return 1;
}
offset = 0;
if (nb < 4) {
/* read/write the least significant bits */
data.l = 0;
offset = 4 - nb;
}
/* Verify the address of the operand */
if (user_mode(regs)) {
if (!access_ok((flags & ST? VERIFY_WRITE: VERIFY_READ), addr, nb))
return -EFAULT; /* bad address */
}
if (flags & F) {
preempt_disable();
if (regs->msr & MSR_FP)
giveup_fpu(current);
preempt_enable();
}
/* If we read the operand, copy it in, else get register values */
if (flags & LD) {
for (i = 0; i < nb; ++i)
if (__get_user(data.v[offset+i], addr+i))
return -EFAULT;
} else if (flags & F) {
data.d = current->thread.fpr[reg];
} else {
data.l = regs->gpr[reg];
}
switch (flags & ~U) {
case LD+SE: /* sign extend */
if (data.v[2] >= 0x80)
data.v[0] = data.v[1] = -1;
break;
case LD+S: /* byte-swap */
case ST+S:
if (nb == 2) {
SWAP(data.v[2], data.v[3]);
} else {
SWAP(data.v[0], data.v[3]);
SWAP(data.v[1], data.v[2]);
}
break;
/* Single-precision FP load and store require conversions... */
case LD+F+S:
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
cvt_fd(&data.f, &data.d, &current->thread);
preempt_enable();
#else
return 0;
#endif
break;
case ST+F+S:
#ifdef CONFIG_PPC_FPU
preempt_disable();
enable_kernel_fp();
cvt_df(&data.d, &data.f, &current->thread);
preempt_enable();
#else
return 0;
#endif
break;
}
if (flags & ST) {
for (i = 0; i < nb; ++i)
if (__put_user(data.v[offset+i], addr+i))
return -EFAULT;
} else if (flags & F) {
current->thread.fpr[reg] = data.d;
} else {
regs->gpr[reg] = data.l;
}
if (flags & U)
regs->gpr[areg] = regs->dar;
return 1;
}
...@@ -45,7 +45,6 @@ static void update_bridge_base(struct pci_bus *bus, int i); ...@@ -45,7 +45,6 @@ static void update_bridge_base(struct pci_bus *bus, int i);
static void pcibios_fixup_resources(struct pci_dev* dev); static void pcibios_fixup_resources(struct pci_dev* dev);
static void fixup_broken_pcnet32(struct pci_dev* dev); static void fixup_broken_pcnet32(struct pci_dev* dev);
static int reparent_resources(struct resource *parent, struct resource *res); static int reparent_resources(struct resource *parent, struct resource *res);
static void fixup_rev1_53c810(struct pci_dev* dev);
static void fixup_cpc710_pci64(struct pci_dev* dev); static void fixup_cpc710_pci64(struct pci_dev* dev);
#ifdef CONFIG_PPC_OF #ifdef CONFIG_PPC_OF
static u8* pci_to_OF_bus_map; static u8* pci_to_OF_bus_map;
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#define BCSR_ADDR ((uint)0xf8000000) #define BCSR_ADDR ((uint)0xf8000000)
#define BCSR_SIZE ((uint)(32 * 1024)) #define BCSR_SIZE ((uint)(32 * 1024))
struct seq_file;
extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m); extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m);
extern void mpc85xx_ads_init_IRQ(void) __init; extern void mpc85xx_ads_init_IRQ(void) __init;
extern void mpc85xx_ads_map_io(void) __init; extern void mpc85xx_ads_map_io(void) __init;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/seq_file.h>
#include <asm/ppcboot.h> #include <asm/ppcboot.h>
#define BOARD_CCSRBAR ((uint)0xe0000000) #define BOARD_CCSRBAR ((uint)0xe0000000)
...@@ -43,7 +42,6 @@ extern void mpc85xx_setup_hose(void) __init; ...@@ -43,7 +42,6 @@ extern void mpc85xx_setup_hose(void) __init;
extern void mpc85xx_restart(char *cmd); extern void mpc85xx_restart(char *cmd);
extern void mpc85xx_power_off(void); extern void mpc85xx_power_off(void);
extern void mpc85xx_halt(void); extern void mpc85xx_halt(void);
extern int mpc85xx_show_cpuinfo(struct seq_file *m);
extern void mpc85xx_init_IRQ(void) __init; extern void mpc85xx_init_IRQ(void) __init;
extern unsigned long mpc85xx_find_end_of_memory(void) __init; extern unsigned long mpc85xx_find_end_of_memory(void) __init;
extern void mpc85xx_calibrate_decr(void) __init; extern void mpc85xx_calibrate_decr(void) __init;
......
...@@ -69,9 +69,33 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -69,9 +69,33 @@ struct ppc_sys_spec ppc_sys_specs[] = {
}, },
}, },
{ {
.ppc_sys_name = "8343E", .ppc_sys_name = "8347E",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80540000, .value = 0x80540000,
.num_devices = 9,
.device_list = (enum ppc_sys_devices[])
{
MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
},
},
{
.ppc_sys_name = "8347",
.mask = 0xFFFF0000,
.value = 0x80550000,
.num_devices = 8,
.device_list = (enum ppc_sys_devices[])
{
MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
MPC83xx_IIC2, MPC83xx_DUART,
MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
},
},
{
.ppc_sys_name = "8343E",
.mask = 0xFFFF0000,
.value = 0x80560000,
.num_devices = 8, .num_devices = 8,
.device_list = (enum ppc_sys_devices[]) .device_list = (enum ppc_sys_devices[])
{ {
...@@ -83,7 +107,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { ...@@ -83,7 +107,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
{ {
.ppc_sys_name = "8343", .ppc_sys_name = "8343",
.mask = 0xFFFF0000, .mask = 0xFFFF0000,
.value = 0x80550000, .value = 0x80570000,
.num_devices = 7, .num_devices = 7,
.device_list = (enum ppc_sys_devices[]) .device_list = (enum ppc_sys_devices[])
{ {
......
menu "Kernel hacking"
source "lib/Kconfig.debug"
config DEBUG_STACKOVERFLOW
bool "Check for stack overflows"
depends on DEBUG_KERNEL
help
This option will cause messages to be printed if free stack space
drops below a certain limit.
config KPROBES
bool "Kprobes"
depends on DEBUG_KERNEL
help
Kprobes allows you to trap at almost any kernel address and
execute a callback function. register_kprobe() establishes
a probepoint and specifies the callback. Kprobes is useful
for kernel debugging, non-intrusive instrumentation and testing.
If in doubt, say "N".
config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL
help
Enables the display of the minimum amount of free stack which each
task has ever had available in the sysrq-T and sysrq-P debug output.
This option will slow down process creation somewhat.
config DEBUGGER
bool "Enable debugger hooks"
depends on DEBUG_KERNEL
help
Include in-kernel hooks for kernel debuggers. Unless you are
intending to debug the kernel, say N here.
config XMON
bool "Include xmon kernel debugger"
depends on DEBUGGER && !PPC_ISERIES
help
Include in-kernel hooks for the xmon kernel monitor/debugger.
Unless you are intending to debug the kernel, say N here.
Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise
nothing will appear on the screen (xmon writes directly to the
framebuffer memory).
The cmdline option 'xmon' or 'xmon=early' will drop into xmon very
early during boot. 'xmon=on' will just enable the xmon debugger hooks.
'xmon=off' will disable the debugger hooks if CONFIG_XMON_DEFAULT is set.
config XMON_DEFAULT
bool "Enable xmon by default"
depends on XMON
help
xmon is normally disabled unless booted with 'xmon=on'.
Use 'xmon=off' to disable xmon init during runtime.
config IRQSTACKS
bool "Use separate kernel stacks when processing interrupts"
help
If you say Y here the kernel will use separate kernel stacks
for handling hard and soft interrupts. This can help avoid
overflowing the process kernel stacks.
endmenu
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1994 by Linus Torvalds
# Changes for PPC by Gary Thomas
# Rewritten by Cort Dougan and Paul Mackerras
# Adjusted for PPC64 by Tom Gall
#
KERNELLOAD := 0xc000000000000000
# Set default 32 bits cross compilers for vdso and boot wrapper
CROSS32_COMPILE ?=
CROSS32CC := $(CROSS32_COMPILE)gcc
CROSS32AS := $(CROSS32_COMPILE)as
CROSS32LD := $(CROSS32_COMPILE)ld
CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy
# If we have a biarch compiler, use it for 32 bits cross compile if
# CROSS32_COMPILE wasn't explicitely defined, and add proper explicit
# target type to target compilers
HAS_BIARCH := $(call cc-option-yn, -m64)
ifeq ($(HAS_BIARCH),y)
ifeq ($(CROSS32_COMPILE),)
CROSS32CC := $(CC) -m32
CROSS32AS := $(AS) -a32
CROSS32LD := $(LD) -m elf32ppc
CROSS32OBJCOPY := $(OBJCOPY)
endif
override AS += -a64
override LD += -m elf64ppc
override CC += -m64
endif
export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
ifeq ($(new_nm),y)
NM := $(NM) --synthetic
endif
CHECKFLAGS += -m64 -D__powerpc__ -D__powerpc64__
LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \
-mcall-aixdesc
# Temporary hack until we have migrated to asm-powerpc
CPPFLAGS += -Iarch/$(ARCH)/include
GCC_VERSION := $(call cc-version)
GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;)
ifeq ($(CONFIG_POWER4_ONLY),y)
ifeq ($(CONFIG_ALTIVEC),y)
ifeq ($(GCC_BROKEN_VEC),y)
CFLAGS += $(call cc-option,-mcpu=970)
else
CFLAGS += $(call cc-option,-mcpu=power4)
endif
else
CFLAGS += $(call cc-option,-mcpu=power4)
endif
else
CFLAGS += $(call cc-option,-mtune=power4)
endif
# No AltiVec instruction when building kernel
CFLAGS += $(call cc-option, -mno-altivec)
# Enable unit-at-a-time mode when possible. It shrinks the
# kernel considerably.
CFLAGS += $(call cc-option,-funit-at-a-time)
head-y := arch/ppc64/kernel/head.o
head-y += arch/powerpc/kernel/fpu.o
head-y += arch/powerpc/kernel/entry_64.o
core-y += arch/ppc64/kernel/ arch/powerpc/kernel/
core-y += arch/powerpc/mm/
core-y += arch/powerpc/sysdev/
core-y += arch/powerpc/platforms/
core-y += arch/powerpc/lib/
core-$(CONFIG_XMON) += arch/powerpc/xmon/
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
boot := arch/ppc64/boot
boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd
boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode
boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd
boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm
boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd
$(boottargets-y): vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage
bootimage-$(CONFIG_PPC_PMAC) := vmlinux
bootimage-$(CONFIG_PPC_MAPLE) := $(boot)/zImage
bootimage-$(CONFIG_PPC_BPA) := $(boot)/zImage
bootimage-$(CONFIG_PPC_ISERIES) := vmlinux
BOOTIMAGE := $(bootimage-y)
install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
defaultimage-$(CONFIG_PPC_PSERIES) := zImage
defaultimage-$(CONFIG_PPC_PMAC) := zImage.vmode
defaultimage-$(CONFIG_PPC_MAPLE) := zImage
defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
KBUILD_IMAGE := $(defaultimage-y)
all: $(KBUILD_IMAGE)
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
# Temporary hack until we have migrated to asm-powerpc
$(Q)rm -rf arch/$(ARCH)/include
# Temporary hack until we have migrated to asm-powerpc
include/asm: arch/$(ARCH)/include/asm
arch/$(ARCH)/include/asm:
$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
$(Q)ln -fsn $(srctree)/include/asm-powerpc arch/$(ARCH)/include/asm
define archhelp
echo ' zImage.vmode - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)'
echo ' zImage.initrd.vmode - Compressed kernel image with initrd attached,'
echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
echo ' (arch/$(ARCH)/boot/zImage.initrd.vmode)'
echo ' zImage - zImage for pSeries machines'
echo ' zImage.initrd - zImage with initrd for pSeries machines'
endef
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#
# Makefile for the linux ppc64 kernel.
#
obj-y += idle.o align.o
obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o
...@@ -514,8 +514,6 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr) ...@@ -514,8 +514,6 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr)
static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
{ {
int i;
ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt"); ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt");
if (!pr) if (!pr)
...@@ -524,8 +522,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) ...@@ -524,8 +522,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
if (!pr->pblk) if (!pr->pblk)
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) memset(pr->power.states, 0, sizeof(pr->power.states));
memset(pr->power.states, 0, sizeof(struct acpi_processor_cx));
/* if info is obtained from pblk/fadt, type equals state */ /* if info is obtained from pblk/fadt, type equals state */
pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
...@@ -555,13 +552,9 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) ...@@ -555,13 +552,9 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr) static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr)
{ {
int i;
ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1");
for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) memset(pr->power.states, 0, sizeof(pr->power.states));
memset(&(pr->power.states[i]), 0,
sizeof(struct acpi_processor_cx));
/* if info is obtained from pblk/fadt, type equals state */ /* if info is obtained from pblk/fadt, type equals state */
pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1;
...@@ -873,7 +866,8 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) ...@@ -873,7 +866,8 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
if (pr->power.states[i].valid) { if (pr->power.states[i].valid) {
pr->power.count = i; pr->power.count = i;
pr->flags.power = 1; if (pr->power.states[i].type >= ACPI_STATE_C2)
pr->flags.power = 1;
} }
} }
......
...@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struct smi_info *smi_info) ...@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struct smi_info *smi_info)
static inline void wait_for_timer_and_thread(struct smi_info *smi_info) static inline void wait_for_timer_and_thread(struct smi_info *smi_info)
{ {
if (smi_info->thread != ERR_PTR(-ENOMEM)) if (smi_info->thread != NULL && smi_info->thread != ERR_PTR(-ENOMEM))
kthread_stop(smi_info->thread); kthread_stop(smi_info->thread);
del_timer_sync(&smi_info->si_timer); del_timer_sync(&smi_info->si_timer);
} }
......
...@@ -6,7 +6,7 @@ menu "TPM devices" ...@@ -6,7 +6,7 @@ menu "TPM devices"
config TCG_TPM config TCG_TPM
tristate "TPM Hardware Support" tristate "TPM Hardware Support"
depends on EXPERIMENTAL && PCI depends on EXPERIMENTAL
---help--- ---help---
If you have a TPM security chip in your system, which If you have a TPM security chip in your system, which
implements the Trusted Computing Group's specification, implements the Trusted Computing Group's specification,
......
...@@ -377,6 +377,7 @@ int tpm_release(struct inode *inode, struct file *file) ...@@ -377,6 +377,7 @@ int tpm_release(struct inode *inode, struct file *file)
file->private_data = NULL; file->private_data = NULL;
chip->num_opens--; chip->num_opens--;
del_singleshot_timer_sync(&chip->user_read_timer); del_singleshot_timer_sync(&chip->user_read_timer);
flush_scheduled_work();
atomic_set(&chip->data_pending, 0); atomic_set(&chip->data_pending, 0);
put_device(chip->dev); put_device(chip->dev);
kfree(chip->data_buffer); kfree(chip->data_buffer);
...@@ -428,6 +429,7 @@ ssize_t tpm_read(struct file * file, char __user *buf, ...@@ -428,6 +429,7 @@ ssize_t tpm_read(struct file * file, char __user *buf,
int ret_size; int ret_size;
del_singleshot_timer_sync(&chip->user_read_timer); del_singleshot_timer_sync(&chip->user_read_timer);
flush_scheduled_work();
ret_size = atomic_read(&chip->data_pending); ret_size = atomic_read(&chip->data_pending);
atomic_set(&chip->data_pending, 0); atomic_set(&chip->data_pending, 0);
if (ret_size > 0) { /* relay data */ if (ret_size > 0) { /* relay data */
......
...@@ -47,13 +47,12 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) ...@@ -47,13 +47,12 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count)
return -EIO; return -EIO;
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
status = atmel_getb(chip, 1); status = ioread8(chip->vendor->iobase + 1);
if ((status & ATML_STATUS_DATA_AVAIL) == 0) { if ((status & ATML_STATUS_DATA_AVAIL) == 0) {
dev_err(chip->dev, dev_err(chip->dev, "error reading header\n");
"error reading header\n");
return -EIO; return -EIO;
} }
*buf++ = atmel_getb(chip, 0); *buf++ = ioread8(chip->vendor->iobase);
} }
/* size of the data received */ /* size of the data received */
...@@ -64,10 +63,9 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) ...@@ -64,10 +63,9 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count)
dev_err(chip->dev, dev_err(chip->dev,
"Recv size(%d) less than available space\n", size); "Recv size(%d) less than available space\n", size);
for (; i < size; i++) { /* clear the waiting data anyway */ for (; i < size; i++) { /* clear the waiting data anyway */
status = atmel_getb(chip, 1); status = ioread8(chip->vendor->iobase + 1);
if ((status & ATML_STATUS_DATA_AVAIL) == 0) { if ((status & ATML_STATUS_DATA_AVAIL) == 0) {
dev_err(chip->dev, dev_err(chip->dev, "error reading data\n");
"error reading data\n");
return -EIO; return -EIO;
} }
} }
...@@ -76,17 +74,17 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) ...@@ -76,17 +74,17 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count)
/* read all the data available */ /* read all the data available */
for (; i < size; i++) { for (; i < size; i++) {
status = atmel_getb(chip, 1); status = ioread8(chip->vendor->iobase + 1);
if ((status & ATML_STATUS_DATA_AVAIL) == 0) { if ((status & ATML_STATUS_DATA_AVAIL) == 0) {
dev_err(chip->dev, dev_err(chip->dev, "error reading data\n");
"error reading data\n");
return -EIO; return -EIO;
} }
*buf++ = atmel_getb(chip, 0); *buf++ = ioread8(chip->vendor->iobase);
} }
/* make sure data available is gone */ /* make sure data available is gone */
status = atmel_getb(chip, 1); status = ioread8(chip->vendor->iobase + 1);
if (status & ATML_STATUS_DATA_AVAIL) { if (status & ATML_STATUS_DATA_AVAIL) {
dev_err(chip->dev, "data available is stuck\n"); dev_err(chip->dev, "data available is stuck\n");
return -EIO; return -EIO;
...@@ -102,7 +100,7 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count) ...@@ -102,7 +100,7 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count)
dev_dbg(chip->dev, "tpm_atml_send:\n"); dev_dbg(chip->dev, "tpm_atml_send:\n");
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
dev_dbg(chip->dev, "%d 0x%x(%d)\n", i, buf[i], buf[i]); dev_dbg(chip->dev, "%d 0x%x(%d)\n", i, buf[i], buf[i]);
atmel_putb(buf[i], chip, 0); iowrite8(buf[i], chip->vendor->iobase);
} }
return count; return count;
...@@ -110,12 +108,12 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count) ...@@ -110,12 +108,12 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count)
static void tpm_atml_cancel(struct tpm_chip *chip) static void tpm_atml_cancel(struct tpm_chip *chip)
{ {
atmel_putb(ATML_STATUS_ABORT, chip, 1); iowrite8(ATML_STATUS_ABORT, chip->vendor->iobase + 1);
} }
static u8 tpm_atml_status(struct tpm_chip *chip) static u8 tpm_atml_status(struct tpm_chip *chip)
{ {
return atmel_getb(chip, 1); return ioread8(chip->vendor->iobase + 1);
} }
static struct file_operations atmel_ops = { static struct file_operations atmel_ops = {
...@@ -162,7 +160,8 @@ static void atml_plat_remove(void) ...@@ -162,7 +160,8 @@ static void atml_plat_remove(void)
if (chip) { if (chip) {
if (chip->vendor->have_region) if (chip->vendor->have_region)
atmel_release_region(chip->vendor->base, chip->vendor->region_size); atmel_release_region(chip->vendor->base,
chip->vendor->region_size);
atmel_put_base_addr(chip->vendor); atmel_put_base_addr(chip->vendor);
tpm_remove_hardware(chip->dev); tpm_remove_hardware(chip->dev);
platform_device_unregister(pdev); platform_device_unregister(pdev);
...@@ -183,14 +182,19 @@ static int __init init_atmel(void) ...@@ -183,14 +182,19 @@ static int __init init_atmel(void)
driver_register(&atml_drv); driver_register(&atml_drv);
if (atmel_get_base_addr(&tpm_atmel) != 0) { if ((tpm_atmel.iobase = atmel_get_base_addr(&tpm_atmel)) == NULL) {
rc = -ENODEV; rc = -ENODEV;
goto err_unreg_drv; goto err_unreg_drv;
} }
tpm_atmel.have_region = (atmel_request_region( tpm_atmel.base, tpm_atmel.region_size, "tpm_atmel0") == NULL) ? 0 : 1; tpm_atmel.have_region =
(atmel_request_region
(tpm_atmel.base, tpm_atmel.region_size,
"tpm_atmel0") == NULL) ? 0 : 1;
if (IS_ERR(pdev = platform_device_register_simple("tpm_atmel", -1, NULL, 0 ))) { if (IS_ERR
(pdev =
platform_device_register_simple("tpm_atmel", -1, NULL, 0))) {
rc = PTR_ERR(pdev); rc = PTR_ERR(pdev);
goto err_rel_reg; goto err_rel_reg;
} }
...@@ -202,9 +206,10 @@ static int __init init_atmel(void) ...@@ -202,9 +206,10 @@ static int __init init_atmel(void)
err_unreg_dev: err_unreg_dev:
platform_device_unregister(pdev); platform_device_unregister(pdev);
err_rel_reg: err_rel_reg:
if (tpm_atmel.have_region)
atmel_release_region(tpm_atmel.base, tpm_atmel.region_size);
atmel_put_base_addr(&tpm_atmel); atmel_put_base_addr(&tpm_atmel);
if (tpm_atmel.have_region)
atmel_release_region(tpm_atmel.base,
tpm_atmel.region_size);
err_unreg_drv: err_unreg_drv:
driver_unregister(&atml_drv); driver_unregister(&atml_drv);
return rc; return rc;
......
...@@ -27,12 +27,14 @@ ...@@ -27,12 +27,14 @@
#define atmel_putb(val, chip, offset) writeb(val, chip->vendor->iobase + offset) #define atmel_putb(val, chip, offset) writeb(val, chip->vendor->iobase + offset)
#define atmel_request_region request_mem_region #define atmel_request_region request_mem_region
#define atmel_release_region release_mem_region #define atmel_release_region release_mem_region
static inline void atmel_put_base_addr(struct tpm_vendor_specific *vendor)
static inline void atmel_put_base_addr(struct tpm_vendor_specific
*vendor)
{ {
iounmap(vendor->iobase); iounmap(vendor->iobase);
} }
static int atmel_get_base_addr(struct tpm_vendor_specific *vendor) static void __iomem * atmel_get_base_addr(struct tpm_vendor_specific *vendor)
{ {
struct device_node *dn; struct device_node *dn;
unsigned long address, size; unsigned long address, size;
...@@ -44,11 +46,11 @@ static int atmel_get_base_addr(struct tpm_vendor_specific *vendor) ...@@ -44,11 +46,11 @@ static int atmel_get_base_addr(struct tpm_vendor_specific *vendor)
dn = of_find_node_by_name(NULL, "tpm"); dn = of_find_node_by_name(NULL, "tpm");
if (!dn) if (!dn)
return 1; return NULL;
if (!device_is_compatible(dn, "AT97SC3201")) { if (!device_is_compatible(dn, "AT97SC3201")) {
of_node_put(dn); of_node_put(dn);
return 1; return NULL;
} }
reg = (unsigned int *) get_property(dn, "reg", &reglen); reg = (unsigned int *) get_property(dn, "reg", &reglen);
...@@ -71,8 +73,7 @@ static int atmel_get_base_addr(struct tpm_vendor_specific *vendor) ...@@ -71,8 +73,7 @@ static int atmel_get_base_addr(struct tpm_vendor_specific *vendor)
vendor->base = address; vendor->base = address;
vendor->region_size = size; vendor->region_size = size;
vendor->iobase = ioremap(address, size); return ioremap(vendor->base, vendor->region_size);
return 0;
} }
#else #else
#define atmel_getb(chip, offset) inb(chip->vendor->base + offset) #define atmel_getb(chip, offset) inb(chip->vendor->base + offset)
...@@ -105,18 +106,19 @@ static int atmel_verify_tpm11(void) ...@@ -105,18 +106,19 @@ static int atmel_verify_tpm11(void)
return 0; return 0;
} }
static inline void atmel_put_base_addr(struct tpm_vendor_specific *vendor) static inline void atmel_put_base_addr(struct tpm_vendor_specific
*vendor)
{ {
} }
/* Determine where to talk to device */ /* Determine where to talk to device */
static unsigned long atmel_get_base_addr(struct tpm_vendor_specific static void __iomem * atmel_get_base_addr(struct tpm_vendor_specific
*vendor) *vendor)
{ {
int lo, hi; int lo, hi;
if (atmel_verify_tpm11() != 0) if (atmel_verify_tpm11() != 0)
return 1; return NULL;
lo = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_LO); lo = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_LO);
hi = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_HI); hi = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_HI);
...@@ -124,6 +126,6 @@ static unsigned long atmel_get_base_addr(struct tpm_vendor_specific ...@@ -124,6 +126,6 @@ static unsigned long atmel_get_base_addr(struct tpm_vendor_specific
vendor->base = (hi << 8) | lo; vendor->base = (hi << 8) | lo;
vendor->region_size = 2; vendor->region_size = 2;
return 0; return ioport_map(vendor->base, vendor->region_size);
} }
#endif #endif
...@@ -326,9 +326,9 @@ static int write_page(struct bitmap *bitmap, struct page *page, int wait) ...@@ -326,9 +326,9 @@ static int write_page(struct bitmap *bitmap, struct page *page, int wait)
} }
} }
ret = page->mapping->a_ops->prepare_write(NULL, page, 0, PAGE_SIZE); ret = page->mapping->a_ops->prepare_write(bitmap->file, page, 0, PAGE_SIZE);
if (!ret) if (!ret)
ret = page->mapping->a_ops->commit_write(NULL, page, 0, ret = page->mapping->a_ops->commit_write(bitmap->file, page, 0,
PAGE_SIZE); PAGE_SIZE);
if (ret) { if (ret) {
unlock_page(page); unlock_page(page);
......
...@@ -3846,11 +3846,20 @@ static int is_mddev_idle(mddev_t *mddev) ...@@ -3846,11 +3846,20 @@ static int is_mddev_idle(mddev_t *mddev)
curr_events = disk_stat_read(disk, sectors[0]) + curr_events = disk_stat_read(disk, sectors[0]) +
disk_stat_read(disk, sectors[1]) - disk_stat_read(disk, sectors[1]) -
atomic_read(&disk->sync_io); atomic_read(&disk->sync_io);
/* Allow some slack between valud of curr_events and last_events, /* The difference between curr_events and last_events
* as there are some uninteresting races. * will be affected by any new non-sync IO (making
* curr_events bigger) and any difference in the amount of
* in-flight syncio (making current_events bigger or smaller)
* The amount in-flight is currently limited to
* 32*64K in raid1/10 and 256*PAGE_SIZE in raid5/6
* which is at most 4096 sectors.
* These numbers are fairly fragile and should be made
* more robust, probably by enforcing the
* 'window size' that md_do_sync sort-of uses.
*
* Note: the following is an unsigned comparison. * Note: the following is an unsigned comparison.
*/ */
if ((curr_events - rdev->last_events + 32) > 64) { if ((curr_events - rdev->last_events + 4096) > 8192) {
rdev->last_events = curr_events; rdev->last_events = curr_events;
idle = 0; idle = 0;
} }
...@@ -4109,7 +4118,7 @@ static void md_do_sync(mddev_t *mddev) ...@@ -4109,7 +4118,7 @@ static void md_do_sync(mddev_t *mddev)
if (currspeed > sysctl_speed_limit_min) { if (currspeed > sysctl_speed_limit_min) {
if ((currspeed > sysctl_speed_limit_max) || if ((currspeed > sysctl_speed_limit_max) ||
!is_mddev_idle(mddev)) { !is_mddev_idle(mddev)) {
msleep(250); msleep(500);
goto repeat; goto repeat;
} }
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
* *
*/ */
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
#define DRV_NAME "e100" #define DRV_NAME "e100"
#define DRV_EXT "-NAPI" #define DRV_EXT "-NAPI"
#define DRV_VERSION "3.4.14-k2"DRV_EXT #define DRV_VERSION "3.4.14-k4"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation"
#define PFX DRV_NAME ": " #define PFX DRV_NAME ": "
...@@ -903,8 +903,8 @@ static void mdio_write(struct net_device *netdev, int addr, int reg, int data) ...@@ -903,8 +903,8 @@ static void mdio_write(struct net_device *netdev, int addr, int reg, int data)
static void e100_get_defaults(struct nic *nic) static void e100_get_defaults(struct nic *nic)
{ {
struct param_range rfds = { .min = 16, .max = 256, .count = 64 }; struct param_range rfds = { .min = 16, .max = 256, .count = 256 };
struct param_range cbs = { .min = 64, .max = 256, .count = 64 }; struct param_range cbs = { .min = 64, .max = 256, .count = 128 };
pci_read_config_byte(nic->pdev, PCI_REVISION_ID, &nic->rev_id); pci_read_config_byte(nic->pdev, PCI_REVISION_ID, &nic->rev_id);
/* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */ /* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */
...@@ -1007,25 +1007,264 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) ...@@ -1007,25 +1007,264 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]); c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]);
} }
/********************************************************/
/* Micro code for 8086:1229 Rev 8 */
/********************************************************/
/* Parameter values for the D101M B-step */
#define D101M_CPUSAVER_TIMER_DWORD 78
#define D101M_CPUSAVER_BUNDLE_DWORD 65
#define D101M_CPUSAVER_MIN_SIZE_DWORD 126
#define D101M_B_RCVBUNDLE_UCODE \
{\
0x00550215, 0xFFFF0437, 0xFFFFFFFF, 0x06A70789, 0xFFFFFFFF, 0x0558FFFF, \
0x000C0001, 0x00101312, 0x000C0008, 0x00380216, \
0x0010009C, 0x00204056, 0x002380CC, 0x00380056, \
0x0010009C, 0x00244C0B, 0x00000800, 0x00124818, \
0x00380438, 0x00000000, 0x00140000, 0x00380555, \
0x00308000, 0x00100662, 0x00100561, 0x000E0408, \
0x00134861, 0x000C0002, 0x00103093, 0x00308000, \
0x00100624, 0x00100561, 0x000E0408, 0x00100861, \
0x000C007E, 0x00222C21, 0x000C0002, 0x00103093, \
0x00380C7A, 0x00080000, 0x00103090, 0x00380C7A, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x0010009C, 0x00244C2D, 0x00010004, 0x00041000, \
0x003A0437, 0x00044010, 0x0038078A, 0x00000000, \
0x00100099, 0x00206C7A, 0x0010009C, 0x00244C48, \
0x00130824, 0x000C0001, 0x00101213, 0x00260C75, \
0x00041000, 0x00010004, 0x00130826, 0x000C0006, \
0x002206A8, 0x0013C926, 0x00101313, 0x003806A8, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00080600, 0x00101B10, 0x00050004, 0x00100826, \
0x00101210, 0x00380C34, 0x00000000, 0x00000000, \
0x0021155B, 0x00100099, 0x00206559, 0x0010009C, \
0x00244559, 0x00130836, 0x000C0000, 0x00220C62, \
0x000C0001, 0x00101B13, 0x00229C0E, 0x00210C0E, \
0x00226C0E, 0x00216C0E, 0x0022FC0E, 0x00215C0E, \
0x00214C0E, 0x00380555, 0x00010004, 0x00041000, \
0x00278C67, 0x00040800, 0x00018100, 0x003A0437, \
0x00130826, 0x000C0001, 0x00220559, 0x00101313, \
0x00380559, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00130831, 0x0010090B, 0x00124813, \
0x000CFF80, 0x002606AB, 0x00041000, 0x00010004, \
0x003806A8, 0x00000000, 0x00000000, 0x00000000, \
}
/********************************************************/
/* Micro code for 8086:1229 Rev 9 */
/********************************************************/
/* Parameter values for the D101S */
#define D101S_CPUSAVER_TIMER_DWORD 78
#define D101S_CPUSAVER_BUNDLE_DWORD 67
#define D101S_CPUSAVER_MIN_SIZE_DWORD 128
#define D101S_RCVBUNDLE_UCODE \
{\
0x00550242, 0xFFFF047E, 0xFFFFFFFF, 0x06FF0818, 0xFFFFFFFF, 0x05A6FFFF, \
0x000C0001, 0x00101312, 0x000C0008, 0x00380243, \
0x0010009C, 0x00204056, 0x002380D0, 0x00380056, \
0x0010009C, 0x00244F8B, 0x00000800, 0x00124818, \
0x0038047F, 0x00000000, 0x00140000, 0x003805A3, \
0x00308000, 0x00100610, 0x00100561, 0x000E0408, \
0x00134861, 0x000C0002, 0x00103093, 0x00308000, \
0x00100624, 0x00100561, 0x000E0408, 0x00100861, \
0x000C007E, 0x00222FA1, 0x000C0002, 0x00103093, \
0x00380F90, 0x00080000, 0x00103090, 0x00380F90, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x0010009C, 0x00244FAD, 0x00010004, 0x00041000, \
0x003A047E, 0x00044010, 0x00380819, 0x00000000, \
0x00100099, 0x00206FFD, 0x0010009A, 0x0020AFFD, \
0x0010009C, 0x00244FC8, 0x00130824, 0x000C0001, \
0x00101213, 0x00260FF7, 0x00041000, 0x00010004, \
0x00130826, 0x000C0006, 0x00220700, 0x0013C926, \
0x00101313, 0x00380700, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00080600, 0x00101B10, 0x00050004, 0x00100826, \
0x00101210, 0x00380FB6, 0x00000000, 0x00000000, \
0x002115A9, 0x00100099, 0x002065A7, 0x0010009A, \
0x0020A5A7, 0x0010009C, 0x002445A7, 0x00130836, \
0x000C0000, 0x00220FE4, 0x000C0001, 0x00101B13, \
0x00229F8E, 0x00210F8E, 0x00226F8E, 0x00216F8E, \
0x0022FF8E, 0x00215F8E, 0x00214F8E, 0x003805A3, \
0x00010004, 0x00041000, 0x00278FE9, 0x00040800, \
0x00018100, 0x003A047E, 0x00130826, 0x000C0001, \
0x002205A7, 0x00101313, 0x003805A7, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00130831, \
0x0010090B, 0x00124813, 0x000CFF80, 0x00260703, \
0x00041000, 0x00010004, 0x00380700 \
}
/********************************************************/
/* Micro code for the 8086:1229 Rev F/10 */
/********************************************************/
/* Parameter values for the D102 E-step */
#define D102_E_CPUSAVER_TIMER_DWORD 42
#define D102_E_CPUSAVER_BUNDLE_DWORD 54
#define D102_E_CPUSAVER_MIN_SIZE_DWORD 46
#define D102_E_RCVBUNDLE_UCODE \
{\
0x007D028F, 0x0E4204F9, 0x14ED0C85, 0x14FA14E9, 0x0EF70E36, 0x1FFF1FFF, \
0x00E014B9, 0x00000000, 0x00000000, 0x00000000, \
0x00E014BD, 0x00000000, 0x00000000, 0x00000000, \
0x00E014D5, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00E014C1, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00E014C8, 0x00000000, 0x00000000, 0x00000000, \
0x00200600, 0x00E014EE, 0x00000000, 0x00000000, \
0x0030FF80, 0x00940E46, 0x00038200, 0x00102000, \
0x00E00E43, 0x00000000, 0x00000000, 0x00000000, \
0x00300006, 0x00E014FB, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000, \
0x00906EFD, 0x00900EFD, 0x00E00EF8, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
0x00000000, 0x00000000, 0x00000000, 0x00000000, \
}
static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb)
{ {
int i; /* *INDENT-OFF* */
static const u32 ucode[UCODE_SIZE] = { static struct {
/* NFS packets are misinterpreted as TCO packets and u32 ucode[UCODE_SIZE + 1];
* incorrectly routed to the BMC over SMBus. This u8 mac;
* microcode patch checks the fragmented IP bit in the u8 timer_dword;
* NFS/UDP header to distinguish between NFS and TCO. */ u8 bundle_dword;
0x0EF70E36, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF, u8 min_size_dword;
0x1FFF1FFF, 0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000, } ucode_opts[] = {
0x00906EFD, 0x00900EFD, 0x00E00EF8, { D101M_B_RCVBUNDLE_UCODE,
}; mac_82559_D101M,
D101M_CPUSAVER_TIMER_DWORD,
if(nic->mac == mac_82551_F || nic->mac == mac_82551_10) { D101M_CPUSAVER_BUNDLE_DWORD,
for(i = 0; i < UCODE_SIZE; i++) D101M_CPUSAVER_MIN_SIZE_DWORD },
{ D101S_RCVBUNDLE_UCODE,
mac_82559_D101S,
D101S_CPUSAVER_TIMER_DWORD,
D101S_CPUSAVER_BUNDLE_DWORD,
D101S_CPUSAVER_MIN_SIZE_DWORD },
{ D102_E_RCVBUNDLE_UCODE,
mac_82551_F,
D102_E_CPUSAVER_TIMER_DWORD,
D102_E_CPUSAVER_BUNDLE_DWORD,
D102_E_CPUSAVER_MIN_SIZE_DWORD },
{ D102_E_RCVBUNDLE_UCODE,
mac_82551_10,
D102_E_CPUSAVER_TIMER_DWORD,
D102_E_CPUSAVER_BUNDLE_DWORD,
D102_E_CPUSAVER_MIN_SIZE_DWORD },
{ {0}, 0, 0, 0, 0}
}, *opts;
/* *INDENT-ON* */
/*************************************************************************
* CPUSaver parameters
*
* All CPUSaver parameters are 16-bit literals that are part of a
* "move immediate value" instruction. By changing the value of
* the literal in the instruction before the code is loaded, the
* driver can change the algorithm.
*
* INTDELAY - This loads the dead-man timer with its inital value.
* When this timer expires the interrupt is asserted, and the
* timer is reset each time a new packet is received. (see
* BUNDLEMAX below to set the limit on number of chained packets)
* The current default is 0x600 or 1536. Experiments show that
* the value should probably stay within the 0x200 - 0x1000.
*
* BUNDLEMAX -
* This sets the maximum number of frames that will be bundled. In
* some situations, such as the TCP windowing algorithm, it may be
* better to limit the growth of the bundle size than let it go as
* high as it can, because that could cause too much added latency.
* The default is six, because this is the number of packets in the
* default TCP window size. A value of 1 would make CPUSaver indicate
* an interrupt for every frame received. If you do not want to put
* a limit on the bundle size, set this value to xFFFF.
*
* BUNDLESMALL -
* This contains a bit-mask describing the minimum size frame that
* will be bundled. The default masks the lower 7 bits, which means
* that any frame less than 128 bytes in length will not be bundled,
* but will instead immediately generate an interrupt. This does
* not affect the current bundle in any way. Any frame that is 128
* bytes or large will be bundled normally. This feature is meant
* to provide immediate indication of ACK frames in a TCP environment.
* Customers were seeing poor performance when a machine with CPUSaver
* enabled was sending but not receiving. The delay introduced when
* the ACKs were received was enough to reduce total throughput, because
* the sender would sit idle until the ACK was finally seen.
*
* The current default is 0xFF80, which masks out the lower 7 bits.
* This means that any frame which is x7F (127) bytes or smaller
* will cause an immediate interrupt. Because this value must be a
* bit mask, there are only a few valid values that can be used. To
* turn this feature off, the driver can write the value xFFFF to the
* lower word of this instruction (in the same way that the other
* parameters are used). Likewise, a value of 0xF800 (2047) would
* cause an interrupt to be generated for every frame, because all
* standard Ethernet frames are <= 2047 bytes in length.
*************************************************************************/
/* if you wish to disable the ucode functionality, while maintaining the
* workarounds it provides, set the following defines to:
* BUNDLESMALL 0
* BUNDLEMAX 1
* INTDELAY 1
*/
#define BUNDLESMALL 1
#define BUNDLEMAX (u16)6
#define INTDELAY (u16)1536 /* 0x600 */
/* do not load u-code for ICH devices */
if (nic->flags & ich)
goto noloaducode;
/* Search for ucode match against h/w rev_id */
for (opts = ucode_opts; opts->mac; opts++) {
int i;
u32 *ucode = opts->ucode;
if (nic->mac != opts->mac)
continue;
/* Insert user-tunable settings */
ucode[opts->timer_dword] &= 0xFFFF0000;
ucode[opts->timer_dword] |= INTDELAY;
ucode[opts->bundle_dword] &= 0xFFFF0000;
ucode[opts->bundle_dword] |= BUNDLEMAX;
ucode[opts->min_size_dword] &= 0xFFFF0000;
ucode[opts->min_size_dword] |= (BUNDLESMALL) ? 0xFFFF : 0xFF80;
for (i = 0; i < UCODE_SIZE; i++)
cb->u.ucode[i] = cpu_to_le32(ucode[i]); cb->u.ucode[i] = cpu_to_le32(ucode[i]);
cb->command = cpu_to_le16(cb_ucode); cb->command = cpu_to_le16(cb_ucode);
} else return;
cb->command = cpu_to_le16(cb_nop); }
noloaducode:
cb->command = cpu_to_le16(cb_nop);
} }
static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, static void e100_setup_iaaddr(struct nic *nic, struct cb *cb,
......
config FEC_8XX config FEC_8XX
tristate "Motorola 8xx FEC driver" tristate "Motorola 8xx FEC driver"
depends on NET_ETHERNET && FEC depends on NET_ETHERNET && 8xx
select MII select MII
config FEC_8XX_GENERIC_PHY config FEC_8XX_GENERIC_PHY
......
...@@ -1360,7 +1360,7 @@ static struct pci_driver ioc3_driver = { ...@@ -1360,7 +1360,7 @@ static struct pci_driver ioc3_driver = {
static int __init ioc3_init_module(void) static int __init ioc3_init_module(void)
{ {
return pci_module_init(&ioc3_driver); return pci_register_driver(&ioc3_driver);
} }
static void __exit ioc3_cleanup_module(void) static void __exit ioc3_cleanup_module(void)
......
...@@ -1346,10 +1346,8 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, ...@@ -1346,10 +1346,8 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
} else { } else {
if (netif_msg_probe(tp)) { if (netif_msg_probe(tp)) {
printk(KERN_ERR PFX printk(KERN_ERR PFX
"Cannot find PowerManagement capability. " "PowerManagement capability not found.\n");
"Aborting.\n");
} }
goto err_out_mwi;
} }
/* make sure PCI base addr 1 is MMIO */ /* make sure PCI base addr 1 is MMIO */
...@@ -2516,7 +2514,7 @@ rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs) ...@@ -2516,7 +2514,7 @@ rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
} while (boguscnt > 0); } while (boguscnt > 0);
if (boguscnt <= 0) { if (boguscnt <= 0) {
if (net_ratelimit() && netif_msg_intr(tp)) { if (netif_msg_intr(tp) && net_ratelimit() ) {
printk(KERN_WARNING printk(KERN_WARNING
"%s: Too much work at interrupt!\n", dev->name); "%s: Too much work at interrupt!\n", dev->name);
} }
......
/* /*
* Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000, 2005 MIPS Technologies, Inc. All rights reserved.
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. * Authors: Carsten Langgaard <carstenl@mips.com>
* Maciej W. Rozycki <macro@mips.com>
* *
* ######################################################################## * ########################################################################
* *
...@@ -265,6 +266,7 @@ ...@@ -265,6 +266,7 @@
/* The SAA9730 (LAN) controller register map, as seen via the PCI-bus. */ /* The SAA9730 (LAN) controller register map, as seen via the PCI-bus. */
#define SAA9730_LAN_REGS_ADDR 0x20400 #define SAA9730_LAN_REGS_ADDR 0x20400
#define SAA9730_LAN_REGS_SIZE 0x00400
struct lan_saa9730_regmap { struct lan_saa9730_regmap {
volatile unsigned int TxBuffA; /* 0x20400 */ volatile unsigned int TxBuffA; /* 0x20400 */
...@@ -309,6 +311,7 @@ typedef volatile struct lan_saa9730_regmap t_lan_saa9730_regmap; ...@@ -309,6 +311,7 @@ typedef volatile struct lan_saa9730_regmap t_lan_saa9730_regmap;
/* The SAA9730 (EVM) controller register map, as seen via the PCI-bus. */ /* The SAA9730 (EVM) controller register map, as seen via the PCI-bus. */
#define SAA9730_EVM_REGS_ADDR 0x02000 #define SAA9730_EVM_REGS_ADDR 0x02000
#define SAA9730_EVM_REGS_SIZE 0x00400
struct evm_saa9730_regmap { struct evm_saa9730_regmap {
volatile unsigned int InterruptStatus1; /* 0x2000 */ volatile unsigned int InterruptStatus1; /* 0x2000 */
...@@ -329,16 +332,32 @@ typedef volatile struct evm_saa9730_regmap t_evm_saa9730_regmap; ...@@ -329,16 +332,32 @@ typedef volatile struct evm_saa9730_regmap t_evm_saa9730_regmap;
struct lan_saa9730_private { struct lan_saa9730_private {
/*
* Rx/Tx packet buffers.
* The Rx and Tx packets must be PACKET_SIZE aligned.
*/
void *buffer_start;
unsigned int buffer_size;
/*
* DMA address of beginning of this object, returned
* by pci_alloc_consistent().
*/
dma_addr_t dma_addr;
/* Pointer to the associated pci device structure */
struct pci_dev *pci_dev;
/* Pointer for the SAA9730 LAN controller register set. */ /* Pointer for the SAA9730 LAN controller register set. */
t_lan_saa9730_regmap *lan_saa9730_regs; t_lan_saa9730_regmap *lan_saa9730_regs;
/* Pointer to the SAA9730 EVM register. */ /* Pointer to the SAA9730 EVM register. */
t_evm_saa9730_regmap *evm_saa9730_regs; t_evm_saa9730_regmap *evm_saa9730_regs;
/* TRUE if the next buffer to write is RxBuffA, FALSE if RxBuffB. */
unsigned char NextRcvToUseIsA;
/* Rcv buffer Index. */ /* Rcv buffer Index. */
unsigned char NextRcvPacketIndex; unsigned char NextRcvPacketIndex;
/* Next buffer index. */
unsigned char NextRcvBufferIndex;
/* Index of next packet to use in that buffer. */ /* Index of next packet to use in that buffer. */
unsigned char NextTxmPacketIndex; unsigned char NextTxmPacketIndex;
...@@ -353,13 +372,8 @@ struct lan_saa9730_private { ...@@ -353,13 +372,8 @@ struct lan_saa9730_private {
unsigned char DmaRcvPackets; unsigned char DmaRcvPackets;
unsigned char DmaTxmPackets; unsigned char DmaTxmPackets;
unsigned char RcvAIndex; /* index into RcvBufferSpace[] for Blk A */ void *TxmBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_TXM_Q_SIZE];
unsigned char RcvBIndex; /* index into RcvBufferSpace[] for Blk B */ void *RcvBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_RCV_Q_SIZE];
unsigned int
TxmBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_TXM_Q_SIZE];
unsigned int
RcvBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_RCV_Q_SIZE];
unsigned int TxBufferFree[LAN_SAA9730_BUFFERS]; unsigned int TxBufferFree[LAN_SAA9730_BUFFERS];
unsigned char PhysicalAddress[LAN_SAA9730_CAM_ENTRIES][6]; unsigned char PhysicalAddress[LAN_SAA9730_CAM_ENTRIES][6];
......
...@@ -154,6 +154,12 @@ MODULE_LICENSE("GPL"); ...@@ -154,6 +154,12 @@ MODULE_LICENSE("GPL");
*/ */
#define MEMORY_WAIT_TIME 16 #define MEMORY_WAIT_TIME 16
/*
* The maximum number of processing loops allowed for each call to the
* IRQ handler.
*/
#define MAX_IRQ_LOOPS 8
/* /*
* This selects whether TX packets are sent one by one to the SMC91x internal * This selects whether TX packets are sent one by one to the SMC91x internal
* memory and throttled until transmission completes. This may prevent * memory and throttled until transmission completes. This may prevent
...@@ -684,7 +690,6 @@ static void smc_hardware_send_pkt(unsigned long data) ...@@ -684,7 +690,6 @@ static void smc_hardware_send_pkt(unsigned long data)
/* queue the packet for TX */ /* queue the packet for TX */
SMC_SET_MMU_CMD(MC_ENQUEUE); SMC_SET_MMU_CMD(MC_ENQUEUE);
SMC_ACK_INT(IM_TX_EMPTY_INT);
smc_special_unlock(&lp->lock); smc_special_unlock(&lp->lock);
dev->trans_start = jiffies; dev->trans_start = jiffies;
...@@ -1207,6 +1212,7 @@ static void smc_phy_configure(void *data) ...@@ -1207,6 +1212,7 @@ static void smc_phy_configure(void *data)
smc_phy_check_media(dev, 1); smc_phy_check_media(dev, 1);
smc_phy_configure_exit: smc_phy_configure_exit:
SMC_SELECT_BANK(2);
spin_unlock_irq(&lp->lock); spin_unlock_irq(&lp->lock);
lp->work_pending = 0; lp->work_pending = 0;
} }
...@@ -1305,7 +1311,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1305,7 +1311,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
SMC_SET_INT_MASK(0); SMC_SET_INT_MASK(0);
/* set a timeout value, so I don't stay here forever */ /* set a timeout value, so I don't stay here forever */
timeout = 8; timeout = MAX_IRQ_LOOPS;
do { do {
status = SMC_GET_INT(); status = SMC_GET_INT();
...@@ -1372,10 +1378,13 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1372,10 +1378,13 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* restore register states */ /* restore register states */
SMC_SET_PTR(saved_pointer); SMC_SET_PTR(saved_pointer);
SMC_SET_INT_MASK(mask); SMC_SET_INT_MASK(mask);
spin_unlock(&lp->lock); spin_unlock(&lp->lock);
DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout); if (timeout == MAX_IRQ_LOOPS)
PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
dev->name, mask);
DBG(3, "%s: Interrupt done (%d loops)\n",
dev->name, MAX_IRQ_LOOPS - timeout);
/* /*
* We return IRQ_HANDLED unconditionally here even if there was * We return IRQ_HANDLED unconditionally here even if there was
......
...@@ -192,7 +192,9 @@ static int cisco_rx(struct sk_buff *skb) ...@@ -192,7 +192,9 @@ static int cisco_rx(struct sk_buff *skb)
"uptime %ud%uh%um%us)\n", "uptime %ud%uh%um%us)\n",
dev->name, days, hrs, dev->name, days, hrs,
min, sec); min, sec);
#if 0
netif_carrier_on(dev); netif_carrier_on(dev);
#endif
hdlc->state.cisco.up = 1; hdlc->state.cisco.up = 1;
} }
} }
...@@ -225,7 +227,9 @@ static void cisco_timer(unsigned long arg) ...@@ -225,7 +227,9 @@ static void cisco_timer(unsigned long arg)
hdlc->state.cisco.settings.timeout * HZ)) { hdlc->state.cisco.settings.timeout * HZ)) {
hdlc->state.cisco.up = 0; hdlc->state.cisco.up = 0;
printk(KERN_INFO "%s: Link down\n", dev->name); printk(KERN_INFO "%s: Link down\n", dev->name);
#if 0
netif_carrier_off(dev); netif_carrier_off(dev);
#endif
} }
cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ,
...@@ -261,8 +265,10 @@ static void cisco_stop(struct net_device *dev) ...@@ -261,8 +265,10 @@ static void cisco_stop(struct net_device *dev)
{ {
hdlc_device *hdlc = dev_to_hdlc(dev); hdlc_device *hdlc = dev_to_hdlc(dev);
del_timer_sync(&hdlc->state.cisco.timer); del_timer_sync(&hdlc->state.cisco.timer);
#if 0
if (netif_carrier_ok(dev)) if (netif_carrier_ok(dev))
netif_carrier_off(dev); netif_carrier_off(dev);
#endif
hdlc->state.cisco.up = 0; hdlc->state.cisco.up = 0;
hdlc->state.cisco.request_sent = 0; hdlc->state.cisco.request_sent = 0;
} }
......
...@@ -545,8 +545,10 @@ static void fr_set_link_state(int reliable, struct net_device *dev) ...@@ -545,8 +545,10 @@ static void fr_set_link_state(int reliable, struct net_device *dev)
hdlc->state.fr.reliable = reliable; hdlc->state.fr.reliable = reliable;
if (reliable) { if (reliable) {
#if 0
if (!netif_carrier_ok(dev)) if (!netif_carrier_ok(dev))
netif_carrier_on(dev); netif_carrier_on(dev);
#endif
hdlc->state.fr.n391cnt = 0; /* Request full status */ hdlc->state.fr.n391cnt = 0; /* Request full status */
hdlc->state.fr.dce_changed = 1; hdlc->state.fr.dce_changed = 1;
...@@ -560,8 +562,10 @@ static void fr_set_link_state(int reliable, struct net_device *dev) ...@@ -560,8 +562,10 @@ static void fr_set_link_state(int reliable, struct net_device *dev)
} }
} }
} else { } else {
#if 0
if (netif_carrier_ok(dev)) if (netif_carrier_ok(dev))
netif_carrier_off(dev); netif_carrier_off(dev);
#endif
while (pvc) { /* Deactivate all PVCs */ while (pvc) { /* Deactivate all PVCs */
pvc_carrier(0, pvc); pvc_carrier(0, pvc);
......
此差异已折叠。
此差异已折叠。
...@@ -372,12 +372,12 @@ int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, ...@@ -372,12 +372,12 @@ int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0,
struct hermes_response *resp); struct hermes_response *resp);
int hermes_allocate(hermes_t *hw, u16 size, u16 *fid); int hermes_allocate(hermes_t *hw, u16 size, u16 *fid);
int hermes_bap_pread(hermes_t *hw, int bap, void *buf, unsigned len, int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len,
u16 id, u16 offset); u16 id, u16 offset);
int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, unsigned len, int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len,
u16 id, u16 offset); u16 id, u16 offset);
int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf,
unsigned data_len, unsigned len, u16 id, u16 offset); unsigned data_len, int len, u16 id, u16 offset);
int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned buflen, int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned buflen,
u16 *length, void *buf); u16 *length, void *buf);
int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, int hermes_write_ltv(hermes_t *hw, int bap, u16 rid,
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册