1. 27 Oct, 2015 17 commits
  2. 23 Oct, 2015 2 commits
    • Scott Wood's avatar
      2c7693e0
    • Scott Wood's avatar
      powerpc/85xx: Load all early TLB entries at once · d9e1831a
      Scott Wood authored
      Use an AS=1 trampoline TLB entry to allow all normal TLB1 entries to
      be loaded at once.  This avoids the need to keep the translation that
      code is executing from in the same TLB entry in the final TLB
      configuration as during early boot, which in turn is helpful for
      relocatable kernels (e.g. kdump) where the kernel is not running from
      what would be the first TLB entry.
      
      On e6500, we limit map_mem_in_cams() to the primary hwthread of a
      core (the boot cpu is always considered primary, as a kdump kernel
      can be entered on any cpu).  Each TLB only needs to be set up once,
      and when we do, we don't want another thread to be running when we
      create a temporary trampoline TLB1 entry.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      d9e1831a
  3. 21 Oct, 2015 3 commits
    • Scott Wood's avatar
      clk: qoriq: Add ls2080a support. · 9e19ca2f
      Scott Wood authored
      LS2080A is the first implementation of the chassis 3 clockgen, which
      has a different register layout than previous chips.  It is also little
      endian, unlike previous chips.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      9e19ca2f
    • Scott Wood's avatar
      clk: qoriq: Move chip-specific knowledge into driver · 0dfc86b3
      Scott Wood authored
      The device tree should describe the chips (or chip-like subblocks) in
      the system, but it generally does not describe individual registers --
      it should identify, rather than describe, a programming interface.
      
      This has not been the case with the QorIQ clockgen nodes.  The
      knowledge of what each bit setting of CLKCnCSR means is encoded in
      three places (binding, pll node, and mux node), and the last also needs
      to know which options are valid on a particular chip.  All three of
      these locations are considered stable ABI, making it difficult to fix
      mistakes (of which I have found several), much less refactor the
      abstraction to be able to address problems, limitations, or new chips.
      
      Under the current binding, a pll clock specifier of 2 means that the
      PLL is divided by 4 -- and the driver implements this, unless there
      happen to be four clock-output-names rather than 3, in which case it
      interprets it as PLL divided by 3.  This does not appear in the binding
      documentation at all.  That hack is now considered stable ABI.
      
      The current device tree nodes contain errors, such as saying that
      T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
      The current binding also ignores some restrictions on clock selection,
      such as p5020's requirement that if a core uses the "wrong" PLL, that
      PLL must be clocked lower than the "correct" PLL and be at most 80% of
      the rated CPU frequency.
      
      Possibly because of the lack of the ability to express such nuance in
      the binding, some valid options are omitted from the device trees, such
      as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
      PLL1 (again, only if they are at most 80% of rated CPU frequency).
      This omission, combined with excessive caution in the cpufreq driver
      (addressed in a subsequent patch), means that currently on a 1500 MHz
      p4080 with typical PLL configuration, cpufreq can lower the frequency
      to 1200 MHz on half the CPUs and do nothing on the others.  With this
      patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
      rev3 p4080 half can be lowered to 750 MHz and the other half to 600
      MHz.
      
      The current binding only deals with CPU clocks.  To describe FMan in
      the device tree, we need to describe its clock.  Some chips have
      additional muxes that work like the CPU muxes, but are not described in
      the device tree.  Others require inspecting the Reset Control Word to
      determine which PLL is used.  Rather than continue to extend this mess,
      replace it.  Have the driver bind to the chip-specific clockgen
      compatible, and keep the detailed description of quirky chip variations
      in the driver, where it can be easily fixed, refactored, and extended.
      
      Older device trees will continue to work (including a workaround for
      old ls1021a device trees that are missing compatible and reg in the
      clockgen node, which even the old binding required).  The pll/mux
      details in old device trees will be ignored, but "clocks" properties
      pointing at the old nodes will still work, and be directed at the
      corresponding new clock.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      0dfc86b3
    • Scott Wood's avatar
      powerpc/fsl: Move fsl_guts.h out of arch/powerpc · 94848654
      Scott Wood authored
      Freescale's Layerscape ARM chips use the same structure.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      94848654
  4. 17 Oct, 2015 10 commits
  5. 16 Oct, 2015 3 commits
  6. 15 Oct, 2015 5 commits
    • Michael Ellerman's avatar
      selftests/powerpc: Allow the tm-syscall test to build with old headers · 20d09927
      Michael Ellerman authored
      When building against older kernel headers, currently the tm-syscall
      test fails to build because PPC_FEATURE2_HTM_NOSC is not defined.
      
      Tweak the test so that if PPC_FEATURE2_HTM_NOSC is not defined it still
      builds, but prints a warning at run time and marks the test as skipped.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      20d09927
    • Michael Ellerman's avatar
      selftests/powerpc: Sort the list of SUB_DIRS to build · 65b6ba63
      Michael Ellerman authored
      This list has gotten too long. Split it into individual lines and sort
      them, so in future we can add new entries more cleanly.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      65b6ba63
    • Michael Ellerman's avatar
      selftests/powerpc: Add tests of unmuxed IPC calls · 0b824f2e
      Michael Ellerman authored
      This is just a simple test which confirms that the individual IPC
      syscalls are all available.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0b824f2e
    • Michael Ellerman's avatar
      powerpc/xmon: Add some more elements to the existing PACA dump list · ad987fc8
      Michael Ellerman authored
      This patch adds a set of new elements to the existing PACA dump list
      inside an xmon session which can be listed below improving the overall
      xmon debug support.
      
      With this patch, a typical xmon PACA dump looks something like this.
      
      paca for cpu 0x0 @ c00000000fdc0000:
       possible             = yes
       present              = yes
       online               = yes
       lock_token           = 0x8000            	(0xa)
       paca_index           = 0x0               	(0x8)
       kernel_toc           = 0xc000000001393200	(0x10)
       kernelbase           = 0xc000000000000000	(0x18)
       kernel_msr           = 0xb000000000001033	(0x20)
       emergency_sp         = 0xc00000003fff0000	(0x28)
       mc_emergency_sp      = 0xc00000003ffec000	(0x2e0)
       in_mce               = 0x0               	(0x2e8)
       hmi_event_available  = 0x0               	(0x2ea)
       data_offset          = 0x1fe7b0000       	(0x30)
       hw_cpu_id            = 0x0               	(0x38)
       cpu_start            = 0x1               	(0x3a)
       kexec_state          = 0x0               	(0x3b)
       slb_shadow[0]:       = 0xc000000008000000 0x40016e7779000510
       slb_shadow[1]:       = 0xd000000008000001 0x400142add1000510
       vmalloc_sllp         = 0x510             	(0x1b8)
       slb_cache_ptr        = 0x4               	(0x1ba)
       slb_cache[0]:        = 0x000000000003f000
       slb_cache[1]:        = 0x0000000000000001
       slb_cache[2]:        = 0x0000000000000003
       slb_cache[3]:        = 0x0000000000001000
       slb_cache[4]:        = 0x0000000000001000
       slb_cache[5]:        = 0x0000000000000000
       slb_cache[6]:        = 0x0000000000000000
       slb_cache[7]:        = 0x0000000000000000
       dscr_default         = 0x0               	(0x58)
       __current            = 0xc000000001331e80	(0x290)
       kstack               = 0xc000000001393e30	(0x298)
       stab_rr              = 0x11              	(0x2a0)
       saved_r1             = 0xc0000001fffef5e0	(0x2a8)
       trap_save            = 0x0               	(0x2b8)
       soft_enabled         = 0x0               	(0x2ba)
       irq_happened         = 0x1               	(0x2bb)
       io_sync              = 0x0               	(0x2bc)
       irq_work_pending     = 0x0               	(0x2bd)
       nap_state_lost       = 0x0               	(0x2be)
       sprg_vdso            = 0x0               	(0x2c0)
       tm_scratch           = 0x8000000100009033	(0x2c8)
       core_idle_state_ptr  = (null)            	(0x2d0)
       thread_idle_state    = 0x0               	(0x2d8)
       thread_mask          = 0x0               	(0x2d9)
       subcore_sibling_mask = 0x0               	(0x2da)
       user_time            = 0x0               	(0x2f0)
       system_time          = 0x0               	(0x2f8)
       user_time_scaled     = 0x0               	(0x300)
       starttime            = 0x3f462418b5cf4   	(0x308)
       starttime_user       = 0x3f4622a57092a   	(0x310)
       startspurr           = 0xd62a5718        	(0x318)
       utime_sspurr         = 0x0               	(0x320)
       stolen_time          = 0x0               	(0x328)
      Signed-off-by: default avatarAnshuman Khandual <khandual@linux.vnet.ibm.com>
      [mpe: Endian swap slb_shadow before display, minor formatting]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      ad987fc8
    • Sam bobroff's avatar
      powerpc/xmon: Paginate kernel log buffer display · 0c23a88c
      Sam bobroff authored
      The kernel log buffer is often much longer than the size of a terminal
      so paginate it's output.
      Signed-off-by: default avatarSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0c23a88c