1. 19 11月, 2007 1 次提交
    • N
      [POWERPC] Fix multiple bugs in rtas_ibm_suspend_me code · 8f5c7579
      Nathan Lynch 提交于
      There are several issues with the rtas_ibm_suspend_me code, which
      enables platform-assisted suspension of an LPAR as covered in PAPR
      2.2.
      
      1.) rtas_ibm_suspend_me uses on_each_cpu() to invoke
      rtas_percpu_suspend_me on all cpus via IPI:
      
      if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
      ...
      
      'data' is on the calling task's stack, but rtas_ibm_suspend_me takes
      no measures to ensure that all instances of rtas_percpu_suspend_me are
      finished accessing 'data' before returning.  This can result in the
      IPI'd cpus accessing random stack data and getting stuck in H_JOIN.
      
      This is addressed by using an atomic count of workers and a completion
      on the stack.
      
      2.) rtas_percpu_suspend_me is needlessly calling H_JOIN in a loop.
      The only event that can cause a cpu to return from H_JOIN is an H_PROD
      from another cpu or a NMI/system reset.  Each cpu need call H_JOIN
      only once per suspend operation.
      
      Remove the loop and the now unnecessary 'waiting' state variable.
      
      3.) H_JOIN must be called with MSR[EE] off, but lazy interrupt
      disabling may cause the caller of rtas_ibm_suspend_me to call H_JOIN
      with it on; the local_irq_disable() in on_each_cpu() is not
      sufficient.
      
      Fix this by explicitly saving the MSR and clearing the EE bit before
      calling H_JOIN.
      
      4.) H_PROD is being called with the Linux logical cpu number as the
      parameter, not the platform interrupt server value.  (It's also being
      called for all possible cpus, which is harmless, but unnecessary.)
      
      This is fixed by calling H_PROD for each online cpu using
      get_hard_smp_processor_id(cpu) for the argument.
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8f5c7579
  2. 18 11月, 2007 3 次提交
    • L
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 2ffbb837
      Linus Torvalds 提交于
      * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: simplify "make ARCH=x86" and fix kconfig all.config
        x86: reboot fixup for wrap2c board
        x86: check boundary in count setup resource
        x86: fix reboot with no keyboard attached
        x86: add hpet sanity checks
        x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c
        x86: fix freeze in x86_64 RTC update code in time_64.c
        ntp: fix typo that makes sync_cmos_clock erratic
        Remove x86 merge artifact from top Makefile
        x86: fixup cpu_info array conversion
        x86: show cpuinfo only for online CPUs
        x86: fix cpu-hotplug regression
        x86: ignore the sys_getcpu() tcache parameter
        x86: voyager use correct header file name
        x86: fix smp init sections
        x86: fix voyager_cat_init section
        x86: fix bogus memcpy in es7000_check_dsdt()
      2ffbb837
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 6840999b
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
      all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
       - 0f855aa6 ("kconfig: add helper to set
         config symbol from environment variable")
       - 2a113281 ("kconfig: use $K64BIT to
         set 64BIT with all*config targets")
      
      Roman Zippel pointed out that kconfig supported string compares so
      the additional complexity introduced by the above two patches were
      not needed.
      
      With this patch we have following behaviour:
      
        # make {allno,allyes,allmod,rand}config [ARCH=...]
        option \ host arch      | 32bit         | 64bit
        =====================================================
        ./.                     | 32bit         | 64bit
        ARCH=x86                | 32bit         | 32bit
        ARCH=i386               | 32bit         | 32bit
        ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture takes
      precedence over the configuration.
      
      So make ARCH=i386 [whatever] will always build a 32-bit kernel
      no matter what the configuration says.  The configuration will
      be updated to 32-bit if it was configured to 64-bit and the
      other way around.
      
      This behaviour is consistent with previous behaviour so no
      suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel but as
      the only ARCH= value x86 allow the user to select between 32-bit
      and 64-bit using menuconfig.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6840999b
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 80ef88d6
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again
      can set 64BIT in all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
      0f855aa6
      -> kconfig: add helper to set config symbol from environment variable
      
      2a113281
      -> kconfig: use $K64BIT to set 64BIT with all*config targets
      
      Roman Zippel pointed out that kconfig supported string
      compares so the additional complexity introduced by the
      above two patches were not needed.
      
      With this patch we have following behaviour:
      
      # make {allno,allyes,allmod,rand}config [ARCH=...]
      option \ host arch      | 32bit         | 64bit
      =====================================================
      ./.                     | 32bit         | 64bit
      ARCH=x86                | 32bit         | 32bit
      ARCH=i386               | 32bit         | 32bit
      ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture
      takes precedence over the configuration.
      So make ARCH=i386 [whatever] will always build a 32-bit
      kernel no matter what the configuration says.
      The configuration will be updated to 32-bit if it was
      configured to 64-bit and the other way around.
      
      This behaviour is consistent with previous behaviour so
      no suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel
      but as the only ARCH= value x86 allow the user to select
      between 32-bit and 64-bit using menuconfig. 
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      80ef88d6
  3. 17 11月, 2007 22 次提交
  4. 16 11月, 2007 14 次提交