* [PATCH 13/15] ppc/pseries: iommu cleanup
[not found] <1284573958-8397-1-git-send-email-nacc@us.ibm.com>
@ 2010-09-15 18:05 ` Nishanth Aravamudan
[not found] ` <1284573958-8397-14-git-send-email-nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Aravamudan @ 2010-09-15 18:05 UTC (permalink / raw)
To: nacc
Cc: devicetree-discuss, Milton Miller, Paul Mackerras,
Anton Blanchard, linuxppc-dev
No need to initialize per-cpu pointer to NULL, it is the default.
Direct dma ops and no setup are the defaults, no need to set for
iommu-off.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/powerpc/platforms/pseries/iommu.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index a77bcae..9184db3 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -140,7 +140,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
return ret;
}
-static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
+static DEFINE_PER_CPU(u64 *, tce_page);
static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
long npages, unsigned long uaddr,
@@ -589,13 +589,8 @@ static struct notifier_block iommu_reconfig_nb = {
/* These are called very early. */
void iommu_init_early_pSeries(void)
{
- if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
- /* Direct I/O, IOMMU off */
- ppc_md.pci_dma_dev_setup = NULL;
- ppc_md.pci_dma_bus_setup = NULL;
- set_pci_dma_ops(&dma_direct_ops);
+ if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL))
return;
- }
if (firmware_has_feature(FW_FEATURE_LPAR)) {
if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 13/15] ppc/pseries: iommu cleanup
[not found] ` <1284573958-8397-14-git-send-email-nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-09-15 18:34 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2010-09-15 18:34 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Milton Miller,
Anton Blanchard, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
On Wed, Sep 15, 2010 at 12:05 PM, Nishanth Aravamudan <nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> No need to initialize per-cpu pointer to NULL, it is the default.
>
> Direct dma ops and no setup are the defaults, no need to set for
> iommu-off.
>
> Signed-off-by: Milton Miller <miltonm-ogEGBHC/i9Y@public.gmane.org>
> Signed-off-by: Nishanth Aravamudan <nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Also looks correct.
Reviewed-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
g.
> ---
> arch/powerpc/platforms/pseries/iommu.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index a77bcae..9184db3 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -140,7 +140,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
> return ret;
> }
>
> -static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
> +static DEFINE_PER_CPU(u64 *, tce_page);
>
> static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
> long npages, unsigned long uaddr,
> @@ -589,13 +589,8 @@ static struct notifier_block iommu_reconfig_nb = {
> /* These are called very early. */
> void iommu_init_early_pSeries(void)
> {
> - if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) {
> - /* Direct I/O, IOMMU off */
> - ppc_md.pci_dma_dev_setup = NULL;
> - ppc_md.pci_dma_bus_setup = NULL;
> - set_pci_dma_ops(&dma_direct_ops);
> + if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL))
> return;
> - }
>
> if (firmware_has_feature(FW_FEATURE_LPAR)) {
> if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
> --
> 1.7.0.4
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-15 18:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1284573958-8397-1-git-send-email-nacc@us.ibm.com>
2010-09-15 18:05 ` [PATCH 13/15] ppc/pseries: iommu cleanup Nishanth Aravamudan
[not found] ` <1284573958-8397-14-git-send-email-nacc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-09-15 18:34 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox