1. 05 11月, 2008 11 次提交
    • B
      powerpc/pci: Use common PHB resource hookup · 53280323
      Benjamin Herrenschmidt 提交于
      The 32-bit and 64-bit powerpc PCI code used to set up the resource
      pointers of the root bus of a given PHB in completely different
      places.
      
      This unifies this in large part, by making 32-bit use a routine very
      similar to what 64-bit does when initially scanning the PCI busses.
      
      The actual setup of the PHB resources itself is then moved to a
      common function in pci-common.c.
      
      This should cause no functional change on 64-bit.  On 32-bit, the
      effect is that the PHB resources are going to be setup a bit earlier,
      instead of being setup from pcibios_fixup_bus().
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      53280323
    • B
      powerpc/pci: Cleanup debug printk's · b0494bc8
      Benjamin Herrenschmidt 提交于
      This removes the various DBG() macro from the powerpc PCI code and
      makes it use the standard pr_debug instead.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b0494bc8
    • M
      powerpc: Update 64bit memcpy() using CPU_FTR_UNALIGNED_LD_STD · 25d6e2d7
      Mark Nelson 提交于
      Update memcpy() to add two new feature sections: one for aligning the
      destination before copying and one for copying using aligned load
      and store doubles.
      
      These new feature sections will only affect Power6 and Cell because
      the CPU feature bit was only added to these two processors.
      
      Power6 gets its best performance in memcpy() when aligning neither the
      source nor the destination, while Cell gets its best performance when
      just the destination is aligned. But in order to save on CPU feature
      bits we can use the previously added CPU_FTR_CP_USE_DCBTZ feature bit
      to differentiate between Power6 and Cell (because CPU_FTR_CP_USE_DCBTZ
      was added to Cell but not Power6).
      
      The first feature section acts to nop out the branch that takes us to
      the code that aligns us to an eight byte boundary for the destination.
      We only want to nop out this branch on Power6.
      
      So the ALT_FTR_SECTION_END() for this feature section creates a test
      mask of the two feature bits ORed together and provides an expected
      result of just CPU_FTR_UNALIGNED_LD_STD, thus we nop out the branch
      if we're on a CPU that has CPU_FTR_UNALIGNED_LD_STD set and
      CPU_FTR_CP_USE_DCBTZ unset.
      
      For the second feature section added, if we're on a CPU that has the
      CPU_FTR_UNALIGNED_LD_STD bit set then we don't want to do the copy
      with aligned loads and stores (and the appropriate shifting left and
      right instructions), so we want to nop out the branch to
      .Lsrc_unaligned.
      
      The andi. used for this branch is moved to just above the branch
      because this allows us to nop out both instructions with just one
      feature section which gives us better performance and doesn't hurt
      readability which two separate feature sections did.
      
      Moving the andi. to just above the branch doesn't have any noticeable
      negative effect on the remaining 64bit processors (the ones that
      didn't have this feature bit added).
      
      On Cell this simple modification results in an improvement to measured
      memcpy() bandwidth of up to 50% in the hot cache case and up to 15% in
      the cold cache case.
      
      On Power6 we get memory bandwidth results that are up to three times
      faster in the hot cache case and up to 50% faster in the cold cache
      case.
      
      Commit 2a929436 ("powerpc: Add new CPU
      feature: CPU_FTR_CP_USE_DCBTZ") was where CPU_FTR_CP_USE_DCBTZ was
      added.
      
      To say that Cell gets its best performance in memcpy() with just the
      destination aligned is true but only for the reason that the indirect
      shift and rotate instructions, sld and srd, are microcoded on Cell.
      This means that either the destination or the source can be aligned,
      but not both, and seeing as we get better performance with the
      destination aligned we choose this option.
      
      While we're at it make a one line change from cmpldi r1,... to
      cmpldi cr1,... for consistency.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      25d6e2d7
    • M
      powerpc: Add new CPU feature: CPU_FTR_UNALIGNED_LD_STD · 4ec577a2
      Mark Nelson 提交于
      Add a new CPU feature bit, CPU_FTR_UNALIGNED_LD_STD, to be added
      to the 64bit powerpc chips that can do unaligned load double and
      store double without any performance hit.
      
      This is added to Power6 and Cell and will be used in the next commit
      to disable the code that gets the destination address aligned on
      those CPUs where doing that doesn't improve performance.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4ec577a2
    • B
      powerpc: Update page-in counter for CMM · 40900194
      Brian King 提交于
      A new field has been added to the VPA as a method for the client OS to
      communicate to firmware the number of page-ins it is performing when
      running collaborative memory overcommit.  The hypervisor will use this
      information to better determine if a partition is experiencing memory
      pressure and needs more memory allocated to it.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      40900194
    • S
      powerpc/pseries: Fix getting the server number size · 1ef8014d
      Sebastien Dugue 提交于
      The 'ibm,interrupt-server#-size' properties are not in the cpu nodes,
      which is where we currently look for them, but rather live under the
      interrupt source controller nodes (which have "ibm,ppc-xics" in their
      compatible property).
      
      This moves the code that looks for the ibm,interrupt-server#-size
      properties from xics_update_irq_servers() into xics_init_IRQ().
      
      Also this adds a check for mismatched sizes across the interrupt
      source controller nodes.  Not sure this is necessary as in this case
      the firmware might be seriously busted.
      
      This property only appears on POWER6 boxes and is only used in the
      set-indicator(gqirm) call, and apparently firmware currently ignores
      the value we pass.  Nevertheless we need to fix it in case future
      firmware versions use it.
      Signed-off-by: NSebastien Dugue <sebastien.dugue@bull.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1ef8014d
    • A
      powerpc: Remove device_type = "rtc" properties in .dts files · 691de576
      Anton Vorontsov 提交于
      We don't want to encourage the device_type usage.  It isn't used in
      the code, so we can simply remove it from the dts files.
      Suggested-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      691de576
    • B
      powerpc: Silence software timebase sync · a6a8e009
      Benjamin Herrenschmidt 提交于
      When no hardware method is provided to sync the timebase registers
      across the machine, and the platform doesn't sync them for us, then we
      use a generic software implementation.  Currently, the code for that
      has many printks, and they don't have log levels.  Most of the printks
      are only useful for debugging the code, and since we haven't had any
      problems with it for years, this turns them into pr_debug.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a6a8e009
    • B
      powerpc: Fix domain numbers in /proc on 64-bit · 1fd0f525
      Benjamin Herrenschmidt 提交于
      The code to properly expose domain numbers in /proc is somewhat
      bogus on ppc64 as it depends on the "buid" field being non-0,
      but that field is really pseries specific.
      
      This removes that code and makes ppc64 use the same code as 32-bit
      which effectively decides whether to expose domains based on
      ppc_pci_flags set by the platform, and sets the default for 64-bit
      to enable domains and enable compatibility for domain 0 (which
      strips the domain number for domain 0 to help with X servers).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1fd0f525
    • S
      powerpc: Fix "unused variable" warning in pci_dlpar.c · 454666eb
      Stephen Rothwell 提交于
      This gets rid of this build warning:
      
      arch/powerpc/platforms/pseries/pci_dlpar.c: In function 'init_phb_dynamic':
      arch/powerpc/platforms/pseries/pci_dlpar.c:192: warning: unused variable 'b'
      
      This is one of the very few warnings left in a ppc64_defconfig build and
      getting rid of it will make it easier to see future introduced ones (in
      fact this was introduced very recently).
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      454666eb
    • A
      powerpc/cell: Fix compile error in ras.c · 9c8b4aff
      Alexey Dobriyan 提交于
      This fixes this error on Cell when CONFIG_KEXEC = n:
      
      arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'
      
      We have to include <asm/kexec.h> because it contains the dummy
      definition of crash_shutdown_register that is used when
      CONFIG_KEXEC=n, but <linux/kexec.h> doesn't include <asm/kexec.h> in
      that case.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9c8b4aff
  2. 04 11月, 2008 1 次提交
  3. 02 11月, 2008 7 次提交
    • M
      sparc64: Fix PCI resource mapping on sparc64 · 5769907a
      Max Dmitrichenko 提交于
      There is a problem discovered in recent versions of ATI Mach64 driver
      in X.org on sparc64 architecture. In short, the driver fails to mmap
      MMIO aperture (PCI resource #2).
      
      I've found that kernel's __pci_mmap_make_offset() returns EINVAL. It
      checks whether user attempts to mmap more than the resource length,
      which is 0x1000 bytes in our case. But PAGE_SIZE on SPARC64 is 0x2000
      and this is what actually is being mmaped. So __pci_mmap_make_offset()
      failed for this PCI resource.
      Signed-off-by: NMax Dmitrichenko <dmitrmax@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5769907a
    • D
      sparc64: Kill annoying warning when building compat_binfmt_elf.o · a1995a65
      David S. Miller 提交于
      GCC warns because some tests against 32-bit values never evaluate to
      true due to how TASK_SIZE is defined.
      
      I always wanted to mimick powerpc's definition of TASK_SIZE, which
      is simply TASK_SIZE_OF(current) and that also fixes the warning.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1995a65
    • A
      sparc32: kernel/trace/trace.c wants DIE_OOPS · e68f0aee
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e68f0aee
    • H
      sparc64: Fix __copy_{to,from}_user_inatomic defines. · 145e1c00
      Hugh Dickins 提交于
      Alexander Beregalov reports oops in __bzero() called from
      copy_from_user_fixup() called from iov_iter_copy_from_user_atomic(),
      when running dbench on tmpfs on sparc64: its __copy_from_user_inatomic
      and __copy_to_user_inatomic should be avoiding, not calling, the fixups.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      145e1c00
    • A
      c10555fa
    • L
      x86: Clean up late e820 resource allocation · 1f987577
      Linus Torvalds 提交于
      This makes the late e820 resources use 'insert_resource_expand_to_fit()'
      instead of doing a 'reserve_region_with_split()', and also avoids
      marking them as IORESOURCE_BUSY.
      
      This results in us being perfectly happy to use pre-existing PCI
      resources even if they were marked as being in a reserved region, while
      still avoiding any _new_ allocations in the reserved regions.  It also
      makes for a simpler and more accurate resource tree.
      
      Example resource allocation from Jonathan Corbet, who has firmware that
      has an e820 reserved entry that covered a big range (e0000000-fed003ff),
      and that had various PCI resources in it set up by firmware.
      
      With old kernels, the reserved range would force us to re-allocate all
      pre-existing PCI resources, and his reserved range would end up looking
      like this:
      
      	e0000000-fed003ff : reserved
      	  fec00000-fec00fff : IOAPIC 0
      	  fed00000-fed003ff : HPET 0
      
      where only the pre-allocated special regions (IOAPIC and HPET) were kept
      around.
      
      With 2.6.28-rc2, which uses 'reserve_region_with_split()', Jonathan's
      resource tree looked like this:
      
      	e0000000-fe7fffff : reserved
      	fe800000-fe8fffff : PCI Bus 0000:01
      	 fe800000-fe8fffff : reserved
      	fe900000-fe9d9aff : reserved
      	fe9d9b00-fe9d9bff : 0000:00:1f.3
      	 fe9d9b00-fe9d9bff : reserved
      	fe9d9c00-fe9d9fff : 0000:00:1a.7
      	 fe9d9c00-fe9d9fff : reserved
      	fe9da000-fe9dafff : 0000:00:03.3
      	 fe9da000-fe9dafff : reserved
      	fe9db000-fe9dbfff : 0000:00:19.0
      	 fe9db000-fe9dbfff : reserved
      	fe9dc000-fe9dffff : 0000:00:1b.0
      	 fe9dc000-fe9dffff : reserved
      	fe9e0000-fe9fffff : 0000:00:19.0
      	 fe9e0000-fe9fffff : reserved
      	fea00000-fea7ffff : 0000:00:02.0
      	 fea00000-fea7ffff : reserved
      	fea80000-feafffff : 0000:00:02.1
      	 fea80000-feafffff : reserved
      	feb00000-febfffff : 0000:00:02.0
      	 feb00000-febfffff : reserved
      	fec00000-fed003ff : reserved
      	 fec00000-fec00fff : IOAPIC 0
      	 fed00000-fed003ff : HPET 0
      
      and because the reserved entry had been split and moved into the
      individual resources, and because it used the IORESOURCE_BUSY flag, the
      drivers that actually wanted to _use_ those resources couldn't actually
      attach to them:
      
      	e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
      	HDA Intel 0000:00:1b.0: BAR 0: can't reserve mem region [0xfe9dc000-0xfe9dffff]
      
      with this patch, the resource tree instead becomes
      
      	e0000000-fed003ff : reserved
      	  fe800000-fe8fffff : PCI Bus 0000:01
      	  fe9d9b00-fe9d9bff : 0000:00:1f.3
      	  fe9d9c00-fe9d9fff : 0000:00:1a.7
      	    fe9d9c00-fe9d9fff : ehci_hcd
      	  fe9da000-fe9dafff : 0000:00:03.3
      	  fe9db000-fe9dbfff : 0000:00:19.0
      	    fe9db000-fe9dbfff : e1000e
      	  fe9dc000-fe9dffff : 0000:00:1b.0
      	    fe9dc000-fe9dffff : ICH HD audio
      	  fe9e0000-fe9fffff : 0000:00:19.0
      	    fe9e0000-fe9fffff : e1000e
      	  fea00000-fea7ffff : 0000:00:02.0
      	  fea80000-feafffff : 0000:00:02.1
      	  feb00000-febfffff : 0000:00:02.0
      	  fec00000-fec00fff : IOAPIC 0
      	  fed00000-fed003ff : HPET 0
      
      ie the one reserved region now ends up surrounding all the PCI resources
      that were allocated inside of it by firmware, and because it is not
      marked BUSY, drivers have no problem attaching to the pre-allocated
      resources.
      Reported-and-tested-by: NJonathan Corbet <corbet@lwn.net>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1f987577
    • A
      saner FASYNC handling on file close · 233e70f4
      Al Viro 提交于
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4
  4. 01 11月, 2008 2 次提交
  5. 31 10月, 2008 19 次提交