1. 16 9月, 2008 1 次提交
    • P
      powerpc: Make the 64-bit kernel as a position-independent executable · 549e8152
      Paul Mackerras 提交于
      This implements CONFIG_RELOCATABLE for 64-bit by making the kernel as
      a position-independent executable (PIE) when it is set.  This involves
      processing the dynamic relocations in the image in the early stages of
      booting, even if the kernel is being run at the address it is linked at,
      since the linker does not necessarily fill in words in the image for
      which there are dynamic relocations.  (In fact the linker does fill in
      such words for 64-bit executables, though not for 32-bit executables,
      so in principle we could avoid calling relocate() entirely when we're
      running a 64-bit kernel at the linked address.)
      
      The dynamic relocations are processed by a new function relocate(addr),
      where the addr parameter is the virtual address where the image will be
      run.  In fact we call it twice; once before calling prom_init, and again
      when starting the main kernel.  This means that reloc_offset() returns
      0 in prom_init (since it has been relocated to the address it is running
      at), which necessitated a few adjustments.
      
      This also changes __va and __pa to use an equivalent definition that is
      simpler.  With the relocatable kernel, PAGE_OFFSET and MEMORY_START are
      constants (for 64-bit) whereas PHYSICAL_START is a variable (and
      KERNELBASE ideally should be too, but isn't yet).
      
      With this, relocatable kernels still copy themselves down to physical
      address 0 and run there.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      549e8152
  2. 01 7月, 2008 2 次提交
  3. 14 6月, 2007 1 次提交
    • P
      [POWERPC] Fix per-cpu allocation on oldworld SMP powermacs · c63c4faa
      Paul Mackerras 提交于
      The per-cpu area(a) for the secondary CPU(s) isn't getting allocated
      on old SMP powermacs that don't have the secondary CPU(s) listed in
      the device tree, as per-cpu areas are now only allocated for CPUs in
      the cpu_possible_map, and we aren't setting the bits for the secondary
      CPU(s) until smp_prepare_cpus(), which is after per-cpu allocation.
      Therefore this sets the bits for CPUs 1..3 in cpu_possible_map in
      pmac_setup_arch, so they get per-cpu data allocated.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c63c4faa
  4. 09 5月, 2007 1 次提交
  5. 07 5月, 2007 2 次提交
  6. 24 4月, 2007 1 次提交
  7. 13 4月, 2007 1 次提交
  8. 07 2月, 2007 1 次提交
  9. 10 10月, 2006 1 次提交
    • P
      [POWERPC] Fix secondary CPU startup on old "powersurge" SMP powermacs · d6a29252
      Paul Mackerras 提交于
      On the old "powersurge" SMP powermacs, the second CPU is started up
      by sending it an IPI, which has the side effect of stopping the
      timebase clock (so the secondary CPU's timebase can be synchronized
      with the primary's).  The routine that did this used udelay, which
      will hang forever when the timebase is stopped, since udelay now spins
      until the timebase reaches a certain value.
      
      The end result is that the kernel would hang when bringing up the
      second CPU.  This fixes it by using a simple loop which just does a
      fixed number of iterations to generate the delay.  These old systems
      were all clocked at around 200 MHz or so, so a fixed number of
      iterations is acceptable.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d6a29252
  10. 07 10月, 2006 1 次提交
  11. 24 9月, 2006 1 次提交
  12. 31 7月, 2006 1 次提交
  13. 03 7月, 2006 1 次提交
  14. 01 7月, 2006 1 次提交
  15. 23 3月, 2006 1 次提交
    • A
      [PATCH] more for_each_cpu() conversions · 394e3902
      Andrew Morton 提交于
      When we stop allocating percpu memory for not-possible CPUs we must not touch
      the percpu data for not-possible CPUs at all.  The correct way of doing this
      is to test cpu_possible() or to use for_each_cpu().
      
      This patch is a kernel-wide sweep of all instances of NR_CPUS.  I found very
      few instances of this bug, if any.  But the patch converts lots of open-coded
      test to use the preferred helper macros.
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: NKyle McMartin <kyle@parisc-linux.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Christian Zankel <chris@zankel.net>
      Cc: Philippe Elie <phil.el@wanadoo.fr>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      394e3902
  16. 03 3月, 2006 1 次提交
  17. 09 1月, 2006 4 次提交
    • B
      [PATCH] 3/5 powerpc: Add platform functions interpreter · 5b9ca526
      Benjamin Herrenschmidt 提交于
      This is the platform function interpreter itself along with the backends
      for UniN/U3/U4, mac-io, GPIOs and i2c. It adds the ability to execute
      those do-platform-* scripts in the device-tree (at least for most
      devices for which a backend is provided). This should replace the clock
      spreading hacks properly. It might also have an impact on all sort of
      machines since some of the scripts marked "at init" will now be executed
      on boot (or some other on sleep/wakeup), those will possibly do things
      that the kernel didn't do at all, like setting some values into some i2c
      devices (changing thermal sensor calibration or conversion rate) etc...
      Thus regression testing is MUCH welcome. Also loook for errors in dmesg.
      That's also why I've left rather verbose debugging enabled in this
      version of the patch.
      
      (I do expect some Windtunnel G4s to show some errors as they have an i2c
      clock chip on the PMU bus that uses some primitives that the i2c backend
      doesn't implement yet. I really need users that have one of those
      machine to come back to me so we can get that done right, though the
      errors themselves should be harmless, I suspect the machine might not
      run at full speed).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5b9ca526
    • B
      [PATCH] 1/5 powerpc: Rework PowerMac i2c part 1 · 730745a5
      Benjamin Herrenschmidt 提交于
      This is the first part of a rework of the PowerMac i2c code. It
      completely reworks the "low_i2c" layer. It is now more flexible,
      supports KeyWest, SMU and PMU i2c busses, and provides functions to
      match device nodes to i2c busses and adapters.
      
      This patch also extends & fix some bugs in the SMU driver related to i2c
      support and removes the clock spreading hacks from the pmac feature code
      rather than adapting them to the new API since they'll be replaced by
      the platform function code completely in patch 3/5
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      730745a5
    • B
      [PATCH] powerpc: Experimental support for new G5 Macs (#2) · 1beb6a7d
      Benjamin Herrenschmidt 提交于
      This adds some very basic support for the new machines, including the
      Quad G5 (tested), and other new dual core based machines and iMac G5
      iSight (untested). This is still experimental !  There is no thermal
      control yet, there is no proper handing of MSIs, etc.. but it
      boots, I have all 4 cores up on my machine. Compared to the previous
      version of this patch, this one adds DART IOMMU support for the U4
      chipset and thus should work fine on setups with more than 2Gb of RAM.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1beb6a7d
    • M
      [PATCH] powerpc: Fixups for kernel linked at 32 MB · 758438a7
      Michael Ellerman 提交于
      There's a few places where we need to fix things up for the kernel to work
      if it's linked at 32MB:
      
       - platforms/powermac/smp.c
         To start secondary cpus on pmac we patch the reset vector, which is fine.
         Except if we're above 32MB we don't have enough bits for an absolute branch,
         it needs to relative.
       - kernel/head_64.s
          - A few branches in the cpu hold code need to load the full target address
            and do a bctr.
          - after_prom_start needs to load PHYSICAL_START as the dest address, not 0.
          - The exception prolog needs to load the low word of the target adddress,
            not just the low halfword.
          - Fixup handling of the initial stab address.
       - kernel/setup_64.c
         smp_release_cpus() needs to write 1 to the spinloop flag near 0, not 32 MB.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      758438a7
  18. 19 11月, 2005 1 次提交
  19. 10 11月, 2005 1 次提交
  20. 22 10月, 2005 1 次提交
    • P
      powerpc: Merge in 64-bit powermac support. · 35499c01
      Paul Mackerras 提交于
      This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to
      arch/powerpc/platforms/powermac/*.c and makes various minor tweaks
      elsewhere.  On the powermac we now initialize ppc_md by copying
      the whole pmac_md structure into it, which required some changes in
      the ordering of initializations of individual fields of it.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      35499c01
  21. 19 10月, 2005 1 次提交
  22. 10 10月, 2005 1 次提交
  23. 01 10月, 2005 1 次提交
  24. 26 9月, 2005 1 次提交
    • P
      powerpc: Merge enough to start building in arch/powerpc. · 14cf11af
      Paul Mackerras 提交于
      This creates the directory structure under arch/powerpc and a bunch
      of Kconfig files.  It does a first-cut merge of arch/powerpc/mm,
      arch/powerpc/lib and arch/powerpc/platforms/powermac.  This is enough
      to build a 32-bit powermac kernel with ARCH=powerpc.
      
      For now we are getting some unmerged files from arch/ppc/kernel and
      arch/ppc/syslib, or arch/ppc64/kernel.  This makes some minor changes
      to files in those directories and files outside arch/powerpc.
      
      The boot directory is still not merged.  That's going to be interesting.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      14cf11af
  25. 19 9月, 2005 1 次提交
  26. 11 9月, 2005 1 次提交
    • P
      [PATCH] ppc32: support hotplug cpu on powermacs · 31139971
      Paul Mackerras 提交于
      This allows cpus to be off-lined on 32-bit SMP powermacs.  When a cpu
      is off-lined, it is put into sleep mode with interrupts disabled.  It
      can be on-lined again by asserting its soft-reset pin, which is
      connected to a GPIO pin.
      
      With this I can off-line the second cpu in my dual G4 powermac, which
      means that I can then suspend the machine (the suspend/resume code
      refuses to suspend if more than one cpu is online, and making it cope
      with multiple cpus is surprisingly messy).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      31139971
  27. 25 4月, 2005 1 次提交
  28. 17 4月, 2005 2 次提交
    • P
      [PATCH] ppc32: improve timebase sync for SMP · 6460b4cc
      Paul Mackerras 提交于
      Currently the procedure in the ppc32 kernel that synchronizes the timebase
      registers across an SMP powermac system does so by setting both timebases
      to zero.  That is OK at boot but causes problems if done later.  So that we
      can do hotplug CPU on these machines, this patch changes the code so it
      reads the timebase from one CPU and transfers the value to the other CPU. 
      (Hotplug CPU is needed for sleep (aka suspend to RAM) to work.)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6460b4cc
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4