Commit graph

210 commits

Author SHA1 Message Date
Nick Piggin 5bfb5d690f [PATCH] sched: disable preempt in idle tasks
Run idle threads with preempt disabled.

Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
How did it ever work before?

Might fix the CPU hotplugging hang which Nigel Cunningham noted.

We think the bug hits if the idle thread is preempted after checking
need_resched() and before going to sleep, then the CPU offlined.

After calling stop_machine_run, the CPU eventually returns from preemption and
into the idle thread and goes to sleep.  The CPU will continue executing
previous idle and have no chance to call play_dead.

By disabling preemption until we are ready to explicitly schedule, this bug is
fixed and the idle threads generally become more robust.

From: alexs <ashepard@u.washington.edu>

  PPC build fix

From: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>

  MIPS build fix

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:56:33 -08:00
Stephen Rothwell d4be4f37d9 ppc64: remove ppc_irq_dispatch_handler
Use __do_IRQ instead.  The only difference is that every controller
is now assumed to have an end() routine (only xics_8259 did not).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-09 16:19:53 +11:00
Stephen Rothwell 5a7b3ff467 ppc64: allow iSeries to use IRQSTACKS again
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-09 15:07:16 +11:00
Paul Mackerras c613523455 Merge ../linux-2.6 2005-11-07 14:42:09 +11:00
David Gibson dcad47fc42 [PATCH] powerpc: Kill ppcdebug
The ancient ppcdebug/PPCDBG mechanism is now only used in two places.
First, in the hash setup code, one of the bits allows the size of the
hash table to be reduced by a factor of 8 - which would be better
accomplished with a command line option for that purpose.  The other
was a bunch of bus walking related messages in the iSeries code, which
would seem to be insufficient reason to keep the mechanism.

This patch removes the last traces of this mechanism.

Built and booted on iSeries and pSeries POWER5 LPAR (ARCH=powerpc).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-07 12:37:45 +11:00
Benjamin Herrenschmidt 3c726f8dee [PATCH] ppc64: support 64k pages
Adds a new CONFIG_PPC_64K_PAGES which, when enabled, changes the kernel
base page size to 64K.  The resulting kernel still boots on any
hardware.  On current machines with 4K pages support only, the kernel
will maintain 16 "subpages" for each 64K page transparently.

Note that while real 64K capable HW has been tested, the current patch
will not enable it yet as such hardware is not released yet, and I'm
still verifying with the firmware architects the proper to get the
information from the newer hypervisors.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-06 16:56:47 -08:00
Stephen Rothwell 2be7a90675 Merge Paulus' tree 2005-11-02 18:15:43 +11:00
Stephen Rothwell aaf8a7a294 Merge iSeries include file move 2005-11-02 16:06:03 +11:00
David Gibson f11b7bd88f [PATCH] powerpc: Move naca.h to platforms/iseries
These days, the NACA only exists on iSeries.  Therefore, this patch
moves naca.h from include/asm-ppc64 to arch/powerpc/platforms/iseries.
There was one file including naca.h outside of platforms/iseries -
arch/ppc64/kernel/udbg_scc.c.  However, that's obviously a hangover
from older days.  The include is not necessary, so this patch simply
removes it.

Built and booted on iSeries, built for G5 (which uses udbg_scc.o).

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-02 16:05:53 +11:00
Kelly Daly b420677870 merge filename and modify references to iseries/vio.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 15:13:57 +11:00
Kelly Daly bbc8b628b0 merge filename and modify references to iSeries/mf.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 15:10:38 +11:00
Kelly Daly c43a55ff4e merge filename and modify references to iseries/lpar_map.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 15:02:47 +11:00
Kelly Daly 59ce20bb34 merge filename and modify references to iseries/it_lp_reg_save.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 14:49:47 +11:00
Kelly Daly 8875ccfb7a merge filename and modify references to iseries/it_lp_queue.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 14:13:34 +11:00
Kelly Daly f218aab5cf merge filename and modify references to iseries/it_lp_naca.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 13:51:41 +11:00
Kelly Daly 7b487bb801 merge filename and modify references to iseries/it_exp_vpd_panel.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 13:48:25 +11:00
Kelly Daly 1ec65d76f3 merge filename and modify references to iseries/hv_types.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 13:46:07 +11:00
Kelly Daly e45423eac2 merge filename and modify references to iseries/hv_lp_event.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 12:08:31 +11:00
Kelly Daly 15b1718948 merge filename and modify reference to iseries/hv_lp_config.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:55:28 +11:00
Kelly Daly 8021b8a776 merge filename and modify references to iseries/hv_call_xm.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:41:12 +11:00
Kelly Daly 50592f5d2a merge filename and modify references to iseries/hv_call_sc.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:37:22 +11:00
Kelly Daly c0a8d05c8a merge filename and modify references to iseries/hv_call_event.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:11:11 +11:00
Kelly Daly 1da4403788 merge filename and modify references to iseries/hv_call.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-01 16:59:20 +11:00
Stephen Rothwell bec7c458b3 powerpc: make mem= work on iSeries again
By parsing the command line earlier, we can add the mem= value to the
flattened device tree and let the generic code sort out the memory limit
for us.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-01 14:34:30 +11:00
Paul Mackerras cf00a8d18b powerpc: Fix bug arising from having multiple memory_limit variables
We had a static memory_limit in prom.c, and then another one defined
in setup_64.c and used in numa.c, which resulted in the kernel crashing
when mem=xxx was given on the command line.  This puts the declaration
in system.h and the definition in mem.c.  This also moves the
definition of tce_alloc_start/end out of setup_64.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-31 13:07:02 +11:00
Stephen Rothwell 7c7eb28481 powerpc: iseries: Fix a bogus comment
A comment in lpevents.c refers to code that's actually in HvCallEvent.h.
The code in HvCallEvent.h is pretty obvious, so just remove the comment
altogether.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 15:42:24 +10:00
Paul Mackerras 985990137e Merge changes from linux-2.6 by hand 2005-10-22 16:51:34 +10:00
Paul Mackerras d8699e65c6 ppc64: Change ppc_md.get_cpuinfo to ppc_md.show_cpuinfo
... for consistency with ppc32; also add in ppc32's show_percpuinfo
function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 17:02:01 +10:00
Paul Mackerras 143a1dec7e powerpc: Merge machdep.h
A few things change for consistency between ppc32 and ppc64:
idle functions return void; *_get_boot_time functions return
unsigned long (i.e. time_t) rather than filling in a struct rtc_time
(since that's useful to the callers and easier for pmac to
generate); *_get_rtc_time and *_set_rtc_time functions take
a struct rtc_time; irq_canonicalize is gone; nvram_sync returns
void.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19 23:11:21 +10:00
Stephen Rothwell c6d2ea92d1 powerpc: move iSeries/HvCallPci.h to platforms/iseries/call_pci.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 17:16:17 +10:00
Stephen Rothwell 0e29bb1a4e powerpc: move iSeries/HvCallHpt.h to platforms/iseries/call_hpt.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 17:09:16 +10:00
Stephen Rothwell 20f48ccfa0 powerpc: eliminate DsaAddr from pci_dn
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 16:49:58 +10:00
Stephen Rothwell bffa8fc383 powerpc: remove ISERIES_[SUB]BUS macros
This allows us to simplify a couple of things.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 15:06:10 +10:00
Stephen Rothwell 426c1a11a6 powerpc: move iSeries/iSeries_pci.h to platforms/iseries
The only real user of this file outside platforms/iseries was
drivers/net/iseries_veth.c but all it wanted was ISERIES_HV_ADDR()
so we move that to abs_addr.h (and lowercase it).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 14:51:42 +10:00
Stephen Rothwell 3a5f8c5f78 powerpc: make iSeries boot again
On ARCH=ppc64 we were getting htab_hash_mask recalculated
to the correct value for our particular machine by accident.
In the merge tree, that code was commented out, so htab_hash_mask
was being corrupted.

We now set ppc64_pft_size instead which gets htab_has_mask
calculated correctly for us later.  We should put an
ibm,pft-size property in the device tree at some point.

Also set -mno-minimal-toc in some makefiles.
Allow iSeries to configure PROC_DEVICETREE.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-12 10:58:00 +10:00
Stephen Rothwell f255f0dd1b powerpc: pci_dn's should point to their device_node's
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-12 10:57:45 +10:00
Paul Mackerras 76f9f87fa5 powerpc: Get iseries to compile with ARCH=powerpc
This moves the Device_List member from struct device_node to
struct pci_dn, which cleans up the device_node and makes the code
a little simpler.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:52:26 +10:00
Paul Mackerras bc6f8a4b19 powerpc: move lparmap.c to arch/powerpc/kernel
Since lparmap.s gets included in arch/powerpc/kernel/head_64.S,
this avoids depending on a file in another directory.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:45:07 +10:00
Stephen Rothwell cabb558714 powerpc: make iSeries build
Merge vmlinux.lds.S.
Also remove arch/powerpc/kernel/vmlinux.lds which is a
generated file.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-01 18:52:10 +10:00
Stephen Rothwell d96024c688 powerpc: Move lparmap.c to powerpc/platforms
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-30 18:04:10 +10:00
Stephen Rothwell b08567cb68 ppc64 iseries: move some iSeries include files
These files are only referenced from within
arch/powerpc/platforms/iseries, so move them there.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-30 18:03:56 +10:00
Stephen Rothwell 252e75a51d ppc64 iSeries: use device_node instead of iSeries_Device_node
There needs to be more cleanup after this.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 14:40:40 +10:00
Stephen Rothwell c111d0bda8 powerpc: move more iSeries code
Move the iSeries specific parts of misc.S and ppc_ksyms.c
into powerpc/platforms/iseries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 13:28:01 +10:00
Stephen Rothwell d223e721b7 powerpc: Move viopath.c to powerpc/platforms/iseries
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 03:12:35 +10:00
Stephen Rothwell b6b8681843 powerpc: Move iSeries_smp.c to powerpc/platforms/iseries
And rename it to smp.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 03:07:14 +10:00
Stephen Rothwell ed7f2c05de powerpc: Move iSeries_vio.c to powerpc/platforms/iseries
And rename it to vio.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 03:03:00 +10:00
Stephen Rothwell da3420fcd6 powerpc: Move iSeries_VpdInfo.c to powerpc/platforms/iseries
And rename it to vpdinfo.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:59:19 +10:00
Stephen Rothwell cb4cf8056e powerpc: Move iSeries_irq.c to powerpc/platorms/iseries
And rename it to irq.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:54:39 +10:00
Stephen Rothwell d387899f3f powerpc: Move iSeries_pci.c to powerpc/platform/iseries
and rename it to pci.c.  This also required moving
arch/ppc64/kernel/pci.h into include/asm-powerpc (called
ppc-pci.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:50:25 +10:00
Stephen Rothwell cc14d43083 powerpc: Move iSeries_iommu.c to powerpc/platforms/iseries
And rename it to iommu.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:32:16 +10:00
Stephen Rothwell e508f438e0 powerpc: Move iSeries_htab.c to powerpc/platforms/iseries
And rename it to htab.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:28:45 +10:00
Stephen Rothwell cb5c7980ab powerpc: move iSeries_proc.c to powerpc/platforms/iseries
And renamed it to proc.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:24:05 +10:00
Stephen Rothwell 544cbbaed4 powerpc: Merge HvLpEvent.c into lpevents.c
These two files were intimately connected, so just merge them.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 02:18:47 +10:00
Stephen Rothwell 99a2379cdd powerpc: move hvCall.s to powerpc/platforms/iseries
Rename it to hvcall.S and (so I can do that) rename hvcall.c
to hvlog.c - a more appropriate name.

Do some white space cleanups.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 00:17:40 +10:00
Stephen Rothwell 2952bc7c89 powerpc: move ItLpQueue.c to powerpc/platforms/iseries
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-28 00:03:46 +10:00
Stephen Rothwell c8b84976f8 powerpc: move iSeries_setup.[ch] and mf.c into platforms/iseries
iSeries_setup.c becomes setup.c
iSeries_setup.h becomes setup.h
mf.c retains its name

Also moved iSeries_[gs]et_rtc_time and iSeries_get_boot_time into
mf.c since they are just small wrappers around mf_ functions.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-27 18:44:42 +10:00
Stephen Rothwell 2960eb661a powerpc: Move LparData.c to powerpc platforms
Also rename it to lpardata.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-27 17:24:54 +10:00
Stephen Rothwell acdbec1b89 powerpc: Move HvLpConfig.c to powerpc arch
Also rename it to hvlpconfig.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-27 17:24:37 +10:00
Stephen Rothwell ba0dd617a3 powerpc: Create arch/powerpc/platforms/iseries
I also move arch/ppc64/kernel/HvCall.c to
arch/powerpc/platforms/iseries/hvcall.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-09-27 17:23:00 +10:00
Paul Mackerras 14cf11af6c powerpc: Merge enough to start building in arch/powerpc.
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: Paul Mackerras <paulus@samba.org>
2005-09-26 16:04:21 +10:00